├── .github └── workflows │ └── test.yml ├── .gitignore ├── .rmt.yml ├── .scrutinizer.yml ├── .styleci.yml ├── .travis.yml ├── CHANGELOG ├── CONTRIBUTING.md ├── LICENSE ├── LICENSE.md ├── README.md ├── RMT ├── bin └── schemacrawler │ ├── config │ ├── schemacrawler.colormap.properties │ └── schemacrawler.config.properties │ ├── lib │ ├── antlr4-runtime-4.7.2.jar │ ├── commons-logging-1.2.jar │ ├── config-1.4.1.jar │ ├── connector-api-1.5.jar │ ├── derby-10.14.2.0.jar │ ├── h2-1.4.200.jar │ ├── hsqldb-2.5.2.jar │ ├── jackcess-3.0.1.jar │ ├── jackson-annotations-2.13.0.jar │ ├── jackson-core-2.13.0.jar │ ├── jackson-databind-2.13.0.jar │ ├── jackson-dataformat-yaml-2.13.0.jar │ ├── jackson-datatype-jsr310-2.13.0.jar │ ├── jaybird-4.0.4.java8.jar │ ├── jcc-11.5.6.0.jar │ ├── jline-3.17.1.jar │ ├── jline-builtins-3.17.1.jar │ ├── jline-console-3.17.1.jar │ ├── jline-reader-3.17.1.jar │ ├── jline-style-3.17.1.jar │ ├── jline-terminal-3.17.1.jar │ ├── monetdb-java-lite-2.39.jar │ ├── monetdb-jdbc-new-2.37.jar │ ├── mssql-jdbc-9.4.0.jre8.jar │ ├── mssql-jdbc_auth-9.4.0.x86.dll │ ├── mysql-connector-java-8.0.27.jar │ ├── ojdbc8_g-21.3.0.0.jar │ ├── picocli-4.6.1.jar │ ├── picocli-shell-jline3-4.6.1.jar │ ├── postgresql-42.3.1.jar │ ├── redshift-jdbc42-2.1.0.1.jar │ ├── schemacrawler-16.15.11.jar │ ├── schemacrawler-api-16.15.11.jar │ ├── schemacrawler-commandline-16.15.11.jar │ ├── schemacrawler-db2-16.15.11.jar │ ├── schemacrawler-diagram-16.15.11.jar │ ├── schemacrawler-hsqldb-16.15.11.jar │ ├── schemacrawler-lint-16.15.11.jar │ ├── schemacrawler-loader-16.15.11.jar │ ├── schemacrawler-mysql-16.15.11.jar │ ├── schemacrawler-offline-16.15.11.jar │ ├── schemacrawler-oracle-16.15.11.jar │ ├── schemacrawler-postgresql-16.15.11.jar │ ├── schemacrawler-scripting-16.15.11.jar │ ├── schemacrawler-sqlite-16.15.11.jar │ ├── schemacrawler-sqlserver-16.15.11.jar │ ├── schemacrawler-text-16.15.11.jar │ ├── schemacrawler-tools-16.15.11.jar │ ├── schemacrawler-utility-16.15.11.jar │ ├── snakeyaml-1.28.jar │ ├── sqlite-jdbc-3.36.0.3.jar │ └── ucanaccess-5.0.1.jar │ ├── sc.db │ ├── schemacrawler.cmd │ └── schemacrawler.sh ├── composer.json ├── composer.lock ├── config └── config.php ├── database └── migrations │ └── 2014_10_12_000000_create_users_table.php ├── phpcs.xml ├── phpmd.xml ├── phpunit.xml.dist ├── src ├── Console │ └── Commands │ │ └── SchemaCrawlerCommand.php ├── Facades │ └── SchemaCrawler.php ├── Http │ ├── Controllers │ │ └── SchemaController.php │ └── routes.php ├── JDBC.php ├── LaravelSchemaCrawler.php ├── LaravelSchemaCrawlerServiceProvider.php └── SchemaCrawlerArguments.php └── tests ├── Console └── Commands │ └── SchemaCrawlerCommandTest.php ├── Http └── Controllers │ └── SchemaControllerTest.php ├── JDBCTest.php ├── SchemaCrawlerArgumentsTest.php ├── SchemaCrawlerTest.php └── TestCase.php /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Run Tests 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | run-tests: 7 | runs-on: ubuntu-latest 8 | strategy: 9 | matrix: 10 | php-versions: ['7.4', '8.0'] 11 | composer-flags: ["--prefer-lowest", ""] 12 | steps: 13 | - uses: actions/checkout@v2 14 | - name: Setup PHP 15 | uses: shivammathur/setup-php@v2 16 | with: 17 | php-version: ${{ matrix.php-versions }} 18 | - name: Install Graphviz 19 | run: | 20 | sudo apt-get update 21 | sudo apt-get install -y graphviz 22 | - name: Set up Database 23 | run: | 24 | sudo systemctl start mysql 25 | mysql -u root -proot -e 'create database crawl_test;' 26 | mysql -u root -proot -e "CREATE USER 'homestead'@'localhost' IDENTIFIED BY 'secret';" 27 | mysql -u root -proot -e "GRANT ALL ON crawl_test.* TO 'homestead'@'localhost';" 28 | - name: Install Dependencies 29 | run: composer update ${composer-flags} --no-interaction --prefer-source 30 | - name: Execute tests (Unit and Feature tests) via PHPUnit 31 | run: vendor/bin/phpunit 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .idea/ 3 | vendor/ 4 | build/ 5 | coverage/ 6 | .DS_Store 7 | .php_cs.cache 8 | -------------------------------------------------------------------------------- /.rmt.yml: -------------------------------------------------------------------------------- 1 | _default: 2 | 3 | # VCS CONFIG 4 | vcs: git 5 | 6 | # PREREQUISITES 7 | # Actions executed before any questions get asked to the user. 8 | # Custom action can be added by provided a relative path the the php script. Example: 9 | # - relative/path/to/your-own-sript.php 10 | prerequisites: 11 | - working-copy-check 12 | - display-last-changes 13 | 14 | # GENERAL CONFIG 15 | # Apply to all branches except the one from the 'branch-specific' section 16 | # Like prerequisites, you can add your own script. Example: 17 | # - relative/path/to/your-own-sript.php 18 | version-generator: simple # Simple versionning 19 | version-persister: 20 | vcs-tag: # Release with VCS tag 21 | tag-prefix: "{branch-name}_" # Prefix any tag with the VCS branch name 22 | post-release-actions: 23 | vcs-publish: # Publish the release to the VCS 24 | ask-confirmation: true 25 | 26 | # BRANCH SPECIFIC CONFIG 27 | # On master, we override the general config 28 | master: 29 | version-generator: semantic # More complex versionning (semantic) 30 | version-persister: 31 | vcs-tag: 32 | tag-prefix: '' # No more prefix for tags 33 | pre-release-actions: 34 | changelog-update: # Update a CHANGELOG file before the release 35 | format: semantic 36 | vcs-commit: ~ # Commit the CHANGELOG -------------------------------------------------------------------------------- /.scrutinizer.yml: -------------------------------------------------------------------------------- 1 | filter: 2 | excluded_paths: [tests/*] 3 | 4 | checks: 5 | php: 6 | remove_extra_empty_lines: true 7 | remove_php_closing_tag: true 8 | remove_trailing_whitespace: true 9 | fix_use_statements: 10 | remove_unused: true 11 | preserve_multiple: false 12 | preserve_blanklines: true 13 | order_alphabetically: true 14 | fix_php_opening_tag: true 15 | fix_linefeed: true 16 | fix_line_ending: true 17 | fix_identation_4spaces: true 18 | fix_doc_comments: true 19 | -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | preset: laravel 2 | 3 | disabled: 4 | - single_class_element_per_statement -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - 7.1 5 | - 7.2 6 | 7 | env: 8 | matrix: 9 | - COMPOSER_FLAGS="--prefer-lowest" 10 | - COMPOSER_FLAGS="" 11 | 12 | before_install: 13 | - sudo apt-get update 14 | - sudo apt-get install -y graphviz 15 | 16 | before_script: 17 | - travis_retry composer self-update 18 | - travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source 19 | - mysql -e 'create database crawl_test;' 20 | - mysql -u root -e "CREATE USER 'homestead'@'localhost' IDENTIFIED BY 'secret';" 21 | - mysql -u root -e "GRANT ALL ON crawl_test.* TO 'homestead'@'localhost';" 22 | services: 23 | - mysql 24 | 25 | script: 26 | - vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover 27 | 28 | after_script: 29 | - php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover -------------------------------------------------------------------------------- /CHANGELOG: -------------------------------------------------------------------------------- 1 | 2 | VERSION 2 SCHEMACRAWLER UPDATED TO 16.7.2 AND LARAVEL 7 SUPPORT 3 | ================================================================ 4 | 5 | Version 2.1 - Update schemacrawler to 16.15.11 6 | 31/10/2021 16:04 2.1.0 initial release 7 | 8 | Version 2.0 - Schemacrawler updated to 16.7.2 and Laravel 7 support 9 | 28/05/2020 07:45 2.0.0 initial release 10 | 11 | VERSION 1 FIRST RELEASE 12 | ======================== 13 | 14 | Version 1.0 - First release 15 | 25/09/2019 22:07 1.0.1 Readme fixes, and example diagram 16 | 25/09/2019 21:39 1.0.0 initial release -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Contributions are **welcome** and will be fully **credited**. 4 | 5 | Please read and understand the contribution guide before creating an issue or pull request. 6 | 7 | ## Etiquette 8 | 9 | This project is open source, and as such, the maintainers give their free time to build and maintain the source code 10 | held within. They make the code freely available in the hope that it will be of use to other developers. It would be 11 | extremely unfair for them to suffer abuse or anger for their hard work. 12 | 13 | Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the 14 | world that developers are civilized and selfless people. 15 | 16 | It's the duty of the maintainer to ensure that all submissions to the project are of sufficient 17 | quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used. 18 | 19 | ## Viability 20 | 21 | When requesting or submitting new features, first consider whether it might be useful to others. Open 22 | source projects are used by many developers, who may have entirely different needs to your own. Think about 23 | whether or not your feature is likely to be used by other users of the project. 24 | 25 | ## Procedure 26 | 27 | Before filing an issue: 28 | 29 | - Attempt to replicate the problem, to ensure that it wasn't a coincidental incident. 30 | - Check to make sure your feature suggestion isn't already present within the project. 31 | - Check the pull requests tab to ensure that the bug doesn't have a fix in progress. 32 | - Check the pull requests tab to ensure that the feature isn't already in progress. 33 | 34 | Before submitting a pull request: 35 | 36 | - Check the codebase to ensure that your feature doesn't already exist. 37 | - Check the pull requests to ensure that another person hasn't already submitted the feature or fix. 38 | 39 | ## Requirements 40 | 41 | If the project maintainer has any additional requirements, you will find them listed here. 42 | 43 | - **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer). 44 | 45 | - **Add tests!** - Your patch won't be accepted if it doesn't have tests. 46 | 47 | - **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. 48 | 49 | - **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option. 50 | 51 | - **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. 52 | 53 | - **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting. 54 | 55 | **Happy coding**! 56 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Daniel Werner 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Daniel Werner 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Laravel SchemaCrawler 2 | 3 | [![Latest Version on Packagist](https://img.shields.io/packagist/v/daniel-werner/laravel-schemacrawler.svg?style=flat-square)](https://packagist.org/packages/daniel-werner/laravel-schemacrawler) 4 | [![Build Status](https://img.shields.io/travis/daniel-werner/laravel-schemacrawler/master.svg?style=flat-square)](https://travis-ci.org/daniel-werner/laravel-schemacrawler) 5 | [![Quality Score](https://img.shields.io/scrutinizer/g/daniel-werner/laravel-schemacrawler.svg?style=flat-square)](https://scrutinizer-ci.com/g/daniel-werner/laravel-schemacrawler) 6 | [![Total Downloads](https://img.shields.io/packagist/dt/daniel-werner/laravel-schemacrawler.svg?style=flat-square)](https://packagist.org/packages/daniel-werner/laravel-schemacrawler) 7 | 8 | This package is a wrapper for the [SchemaCrawler](https://www.schemacrawler.com/). It allows you to generate ER diagram right from the database. 9 | It is capable of creating database diagram from the default schema with zero configuration, but it also offers configuration options for more advanced usage. 10 | 11 | ## Requirements 12 | This package ships with the built in SchemaCrawler, and it requires installed `java` version 8 and `Graphviz`. 13 | 14 | MacOS users can install Graphviz via HomeBrew: 15 | ```bash 16 | brew install graphviz 17 | ``` 18 | 19 | Homestead or Ubuntu users can install it via package manager: 20 | ```bash 21 | sudo apt-get install graphviz 22 | ``` 23 | 24 | ## Installation 25 | 26 | You can install the package via composer: 27 | 28 | ```bash 29 | composer require daniel-werner/laravel-schemacrawler --dev 30 | ``` 31 | 32 | ## Usage 33 | You can generate the diagram using the console command or accessing the `/schema` url. 34 | 35 | ### Console command 36 | ```bash 37 | php artisan schema:generate 38 | ``` 39 | 40 | Running this command will generate a pdf version of the default configured database, 41 | the `schema.pdf` will be placed in the `storage/app/` directory. 42 | 43 | The possible configuration options are the following: 44 | 45 | ``` 46 | --output-file[=OUTPUT-FILE] [default: "schema.pdf"] The name of the generated file 47 | --output-format[=OUTPUT-FORMAT] [default: "pdf"] The output file type, possible values: pdf, png, svg, html 48 | --connection[=CONNECTION] [default: "default"] The connection name to use for diagram generation 49 | --info-level[=INFO-LEVEL] [default: "standard"] Info level for SchemaCrawler, possible values are :detailed, maximum, minimum, standard, unknown 50 | --command[=COMMAND] [default: "schema"] Command for the SchemaCrawler 51 | ``` 52 | 53 | The following commands are available: 54 | 55 | `brief` Shows basic schema information, for tables, views and routines, 56 | columns, primary keys, and foreign keys 57 | 58 | `count` Shows counts of rows in the tables 59 | 60 | `details` Shows maximum possible detail of the schema, including 61 | privileges, and details of privileges, triggers, and check 62 | constraints 63 | 64 | `dump` Shows data from all rows in the tables 65 | 66 | `lint` Find lints (non-adherence to coding standards and conventions) 67 | in the database schema 68 | 69 | `list` Shows a list of schema objects 70 | 71 | `quickdump` Shows data from all rows in the tables, but row order is not 72 | guaranteed - this can be used with a minimum info-level for 73 | speed 74 | 75 | `schema` Shows the commonly needed detail of the schema, including 76 | details of tables, views and routines, columns, primary keys, 77 | indexes, foreign keys, and triggers 78 | 79 | ### Url usage 80 | By default the package registers the `/schema` route in your application. 81 | Visiting this url the package will generate a pdf version of the default database. 82 | 83 | The default configuration can be overwritten with the following query parameters (e.g. `/schema?output_file="database.pdf"`): 84 | 85 | 86 | `output_file` The name of the generated file 87 | 88 | `output_format` The output file type, possible values: pdf, png, svg, html 89 | 90 | `connection` The connection name to use for diagram generation 91 | 92 | `info_level` Info level for SchemaCrawler, possible values are: detailed, maximum, minimum, standard, unknown 93 | 94 | `command` - See the available commands above 95 | 96 | 97 | ### Configuration 98 | The default values for the above detailed configuration options are set up in the package's config file. 99 | If you'd like to change these default values, publish the config file with the following command: 100 | 101 | ```bash 102 | php artisan vendor:publish --provider="DanielWerner\LaravelSchemaCrawler\LaravelSchemaCrawlerServiceProvider" 103 | ``` 104 | 105 | The above command will publish the `laravel-schemacrawler.php` file to your application's `config` directory. 106 | 107 | ### Example output 108 | 109 | This is the database schema of my pet projects [Tracy](https://github.com/daniel-werner/tracy). 110 | 111 | ![](https://www.wernerd.info/wp-content/uploads/2019/09/schema.png) 112 | 113 | ### Testing 114 | 115 | ``` bash 116 | composer test 117 | ``` 118 | 119 | ### Changelog 120 | 121 | Please see [CHANGELOG](CHANGELOG) for more information what has changed recently. 122 | 123 | ## Contributing 124 | 125 | Please see [CONTRIBUTING](CONTRIBUTING.md) for details. 126 | 127 | ### Security 128 | 129 | If you discover any security related issues, please email vernerd@gmail.com instead of using the issue tracker. 130 | 131 | ## Credits 132 | 133 | - [Daniel Werner](https://github.com/daniel-werner) 134 | - [All Contributors](../../contributors) 135 | 136 | ## License 137 | 138 | The MIT License (MIT). Please see [License File](LICENSE.md) for more information. 139 | 140 | ## Laravel Package Boilerplate 141 | 142 | This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com). -------------------------------------------------------------------------------- /RMT: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | for exclude 30 | # - IMPORTANT: Please uncomment the follow patterns only for 31 | # - database that support schemas. SQLite for example does 32 | # - not support schemas 33 | #schemacrawler.schema.pattern.include=.* 34 | #schemacrawler.schema.pattern.exclude= 35 | # - Regular expression table and column name pattern to filter table 36 | # - and column names 37 | # - Column regular expression to match fully qualified column names, 38 | # - in the form "CATALOGNAME.SCHEMANAME.TABLENAME.COLUMNNAME" 39 | # - Default: .* for include, for exclude 40 | #schemacrawler.table.pattern.include=.* 41 | #schemacrawler.table.pattern.exclude= 42 | #schemacrawler.column.pattern.include=.* 43 | #schemacrawler.column.pattern.exclude= 44 | # - Regular expression routine and routine parameter name pattern to filter 45 | # - routine and routine parameter names 46 | # - Default: .* for include, for exclude 47 | #schemacrawler.routine.pattern.include= 48 | #schemacrawler.routine.pattern.exclude=.* 49 | #schemacrawler.routine.inout.pattern.include=.* 50 | #schemacrawler.routine.inout.pattern.exclude= 51 | # - Regular expression synonym pattern to filter 52 | # - synonym names 53 | # - Default: for include, .* for exclude 54 | #schemacrawler.synonym.pattern.include= 55 | #schemacrawler.synonym.pattern.exclude=.* 56 | # - Regular expression sequence pattern to filter 57 | # - sequence names 58 | # - Default: for include, .* for exclude 59 | #schemacrawler.sequence.pattern.include= 60 | #schemacrawler.sequence.pattern.exclude=.* 61 | # 62 | # - Grep Options - inclusion rules 63 | # ------------------------------------------------------------------------------ 64 | # - Include patterns for tables 65 | # - Default: .* for include, for exclude 66 | #schemacrawler.grep.table.pattern.include=.* 67 | #schemacrawler.grep.table.pattern.exclude= 68 | # - Include patterns for table columns 69 | # - Default: .* for include, for exclude 70 | #schemacrawler.grep.column.pattern.include=.* 71 | #schemacrawler.grep.column.pattern.exclude= 72 | # - Include patterns for routine parameters 73 | # - Default: .* for include, for exclude 74 | #schemacrawler.grep.routine.inout.pattern.include=.* 75 | #schemacrawler.grep.routine.inout.pattern.exclude= 76 | # - Include patterns for table and routine definitions 77 | # - Default: .* for include, for exclude 78 | #schemacrawler.grep.definition.pattern.include=.* 79 | #schemacrawler.grep.definition.pattern.exclude= 80 | # 81 | # - Sorting Options 82 | # ------------------------------------------------------------------------------ 83 | # - Sort orders for objects 84 | #schemacrawler.format.sort_alphabetically.tables=true 85 | #schemacrawler.format.sort_alphabetically.table_columns=false 86 | #schemacrawler.format.sort_alphabetically.table_foreignkeys=false 87 | #schemacrawler.format.sort_alphabetically.table_indexes=false 88 | #schemacrawler.format.sort_alphabetically.routines=true 89 | #schemacrawler.format.sort_alphabetically.routine_columns=false 90 | # 91 | # - Show Options - text output formatting 92 | # ------------------------------------------------------------------------------ 93 | # - Controls generation of the SchemaCrawler header and footer in output 94 | # - Default: false 95 | #schemacrawler.format.no_header=false 96 | #schemacrawler.format.no_footer=false 97 | #schemacrawler.format.no_schemacrawler_info=false 98 | #schemacrawler.format.show_database_info=false 99 | #schemacrawler.format.show_jdbc_driver_info=false 100 | # - Controls display of remarks for tables and columns in output 101 | # - Default: false 102 | #schemacrawler.format.hide_remarks=false 103 | # - Shows all object names with the catalog and schema names, for easier comparison 104 | # - across different schemas 105 | # - Default: false 106 | #schemacrawler.format.show_unqualified_names=false 107 | # - Shows standard column names instead of database specific column names 108 | # - Default: false 109 | #schemacrawler.format.show_standard_column_type_names=false 110 | # - Shows ordinal numbers for columns 111 | # - Default: false 112 | #schemacrawler.format.show_ordinal_numbers=false 113 | # - Hides table row counts, even if they are loaded 114 | # - Default: false 115 | #schemacrawler.format.hide_table_row_counts=false 116 | # - If foreign key names, constraint names, trigger names, 117 | # - specific names for routines, or index and primary key names 118 | # - are not explicitly provided while creating a schema, most 119 | # - database systems assign default names. These names can show 120 | # - up as spurious diffs in SchemaCrawler output. 121 | # - All of these are hidden with the --portable-names 122 | # - command-line option. For more control, use the following 123 | # - options. 124 | # - Hides foreign key names, constraint names, trigger names, 125 | # - specific names for routines, index and primary key names 126 | # - Default: false 127 | #schemacrawler.format.hide_primarykey_names=false 128 | #schemacrawler.format.hide_foreignkey_names=false 129 | #schemacrawler.format.hide_alternatekeys_names=false 130 | #schemacrawler.format.hide_weakassociation_names=false 131 | #schemacrawler.format.hide_index_names=false 132 | #schemacrawler.format.hide_trigger_names=false 133 | #schemacrawler.format.hide_routine_specific_names=false 134 | #schemacrawler.format.hide_constraint_names=false 135 | # Specifies how to quote (delimit) database object names in text output 136 | # Options are 137 | # - quote_none - Do not quote any database object names 138 | # - quote_all - Always quote database object names 139 | # - quote_if_special_characters - Only quote database object names 140 | # if they contain special characters 141 | # - quote_if_special_characters_and_reserved_words - Quote database object names 142 | # if they contain special characters or SQL 2003 reserved words 143 | # - Default: quote_if_special_characters_and_reserved_words 144 | #schemacrawler.format.identifier_quoting_strategy=quote_if_special_characters_and_reserved_words 145 | # - Does not color-code catalog and schema names. 146 | # - Default: false 147 | #schemacrawler.format.no_schema_colors=false 148 | # - Encoding of input files, such as Apache Velocity templates 149 | # - Default: UTF-8 150 | #schemacrawler.encoding.input=UTF-8 151 | # - Encoding of SchemaCrawler output files 152 | # - Default: UTF-8 153 | #schemacrawler.encoding.output=UTF-8 154 | # 155 | # - Graphing Options 156 | # - (some graphing options may be controlled by text formatting options) 157 | # ------------------------------------------------------------------------------ 158 | # - Show a crow's foot symbol to indicate cardinality 159 | # - Default: true 160 | #schemacrawler.graph.show.primarykey.cardinality=true 161 | #schemacrawler.graph.show.foreignkey.cardinality=true 162 | # 163 | # - Graph attributes for Graphviz, supporting graph, node and edge 164 | # - See https://www.graphviz.org/doc/info/attrs.html 165 | schemacrawler.graph.graphviz.graph.rankdir=RL 166 | schemacrawler.graph.graphviz.graph.labeljust=r 167 | schemacrawler.graph.graphviz.graph.fontname=Helvetica 168 | schemacrawler.graph.graphviz.node.fontname=Helvetica 169 | schemacrawler.graph.graphviz.node.shape=none 170 | schemacrawler.graph.graphviz.edge.fontname=Helvetica 171 | # - Additional options for Graphviz, to control diagram generation 172 | # - See https://www.graphviz.org/doc/info/command.html 173 | #schemacrawler.graph.graphviz_opts=-Gdpi=300 174 | # - Data Output Options 175 | # ------------------------------------------------------------------------------ 176 | # - Whether to show data from CLOB and BLOB objects 177 | # - Default: false 178 | #schemacrawler.data.show_lobs=false 179 | # 180 | # 181 | # --=----=----=----=----=----=----=----=----=----=----=----=----=----=----=----= 182 | # Queries 183 | # --=----=----=----=----=----=----=----=----=----=----=----=----=----=----=----= 184 | # Define your own named queries, which then become SchemaCrawler command 185 | hsqldb.tables=SELECT * FROM INFORMATION_SCHEMA.SYSTEM_TABLES 186 | tables.select=SELECT ${columns} FROM ${table} ORDER BY ${columns} 187 | tables.drop=DROP ${tabletype} ${table} 188 | -------------------------------------------------------------------------------- /bin/schemacrawler/lib/antlr4-runtime-4.7.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/antlr4-runtime-4.7.2.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/commons-logging-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/commons-logging-1.2.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/config-1.4.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/config-1.4.1.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/connector-api-1.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/connector-api-1.5.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/derby-10.14.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/derby-10.14.2.0.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/h2-1.4.200.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/h2-1.4.200.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/hsqldb-2.5.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/hsqldb-2.5.2.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/jackcess-3.0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/jackcess-3.0.1.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/jackson-annotations-2.13.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/jackson-annotations-2.13.0.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/jackson-core-2.13.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/jackson-core-2.13.0.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/jackson-databind-2.13.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/jackson-databind-2.13.0.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/jackson-dataformat-yaml-2.13.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/jackson-dataformat-yaml-2.13.0.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/jackson-datatype-jsr310-2.13.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/jackson-datatype-jsr310-2.13.0.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/jaybird-4.0.4.java8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/jaybird-4.0.4.java8.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/jcc-11.5.6.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/jcc-11.5.6.0.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/jline-3.17.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/jline-3.17.1.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/jline-builtins-3.17.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/jline-builtins-3.17.1.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/jline-console-3.17.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/jline-console-3.17.1.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/jline-reader-3.17.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/jline-reader-3.17.1.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/jline-style-3.17.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/jline-style-3.17.1.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/jline-terminal-3.17.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/jline-terminal-3.17.1.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/monetdb-java-lite-2.39.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/monetdb-java-lite-2.39.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/monetdb-jdbc-new-2.37.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/monetdb-jdbc-new-2.37.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/mssql-jdbc-9.4.0.jre8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/mssql-jdbc-9.4.0.jre8.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/mssql-jdbc_auth-9.4.0.x86.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/mssql-jdbc_auth-9.4.0.x86.dll -------------------------------------------------------------------------------- /bin/schemacrawler/lib/mysql-connector-java-8.0.27.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/mysql-connector-java-8.0.27.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/ojdbc8_g-21.3.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/ojdbc8_g-21.3.0.0.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/picocli-4.6.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/picocli-4.6.1.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/picocli-shell-jline3-4.6.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/picocli-shell-jline3-4.6.1.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/postgresql-42.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/postgresql-42.3.1.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/redshift-jdbc42-2.1.0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/redshift-jdbc42-2.1.0.1.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/schemacrawler-16.15.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/schemacrawler-16.15.11.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/schemacrawler-api-16.15.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/schemacrawler-api-16.15.11.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/schemacrawler-commandline-16.15.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/schemacrawler-commandline-16.15.11.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/schemacrawler-db2-16.15.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/schemacrawler-db2-16.15.11.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/schemacrawler-diagram-16.15.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/schemacrawler-diagram-16.15.11.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/schemacrawler-hsqldb-16.15.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/schemacrawler-hsqldb-16.15.11.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/schemacrawler-lint-16.15.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/schemacrawler-lint-16.15.11.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/schemacrawler-loader-16.15.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/schemacrawler-loader-16.15.11.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/schemacrawler-mysql-16.15.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/schemacrawler-mysql-16.15.11.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/schemacrawler-offline-16.15.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/schemacrawler-offline-16.15.11.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/schemacrawler-oracle-16.15.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/schemacrawler-oracle-16.15.11.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/schemacrawler-postgresql-16.15.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/schemacrawler-postgresql-16.15.11.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/schemacrawler-scripting-16.15.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/schemacrawler-scripting-16.15.11.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/schemacrawler-sqlite-16.15.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/schemacrawler-sqlite-16.15.11.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/schemacrawler-sqlserver-16.15.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/schemacrawler-sqlserver-16.15.11.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/schemacrawler-text-16.15.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/schemacrawler-text-16.15.11.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/schemacrawler-tools-16.15.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/schemacrawler-tools-16.15.11.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/schemacrawler-utility-16.15.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/schemacrawler-utility-16.15.11.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/snakeyaml-1.28.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/snakeyaml-1.28.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/sqlite-jdbc-3.36.0.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/sqlite-jdbc-3.36.0.3.jar -------------------------------------------------------------------------------- /bin/schemacrawler/lib/ucanaccess-5.0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/lib/ucanaccess-5.0.1.jar -------------------------------------------------------------------------------- /bin/schemacrawler/sc.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniel-werner/laravel-schemacrawler/809a136dbec7760d0afc206a5de1cb417c9d0a6e/bin/schemacrawler/sc.db -------------------------------------------------------------------------------- /bin/schemacrawler/schemacrawler.cmd: -------------------------------------------------------------------------------- 1 | @java "-Djava.library.path=%~dp0/lib/" -classpath "%~dp0/lib/*";"%~dp0/config";. schemacrawler.Main %* 2 | -------------------------------------------------------------------------------- /bin/schemacrawler/schemacrawler.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | SC_DIR=$(dirname "$0") 3 | java -cp "$SC_DIR"/lib/*:"$SC_DIR"/config schemacrawler.Main "$@" 4 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "daniel-werner/laravel-schemacrawler", 3 | "description": "Laravel wrapper for SchemaCrawler", 4 | "keywords": [ 5 | "daniel-werner", 6 | "laravel-schemacrawler" 7 | ], 8 | "homepage": "https://github.com/daniel-werner/laravel-schemacrawler", 9 | "license": "MIT", 10 | "type": "library", 11 | "authors": [ 12 | { 13 | "name": "Daniel Werner", 14 | "email": "vernerd@gmail.com", 15 | "role": "Developer" 16 | } 17 | ], 18 | "require": { 19 | "php": "^7.4|^8.0", 20 | "symfony/process": "^4.1|^5.0|^6.0" 21 | }, 22 | "require-dev": { 23 | "liip/rmt": "^1.5", 24 | "orchestra/testbench": "3.8.*|^4.0|^5.0", 25 | "phpunit/phpunit": "^7.0|^8.0|^9.0" 26 | }, 27 | "autoload": { 28 | "psr-4": { 29 | "DanielWerner\\LaravelSchemaCrawler\\": "src" 30 | } 31 | }, 32 | "autoload-dev": { 33 | "psr-4": { 34 | "DanielWerner\\LaravelSchemaCrawler\\Tests\\": "tests" 35 | } 36 | }, 37 | "scripts": { 38 | "test": "vendor/bin/phpunit", 39 | "test-coverage": "vendor/bin/phpunit --coverage-html coverage", 40 | "inspect": [ 41 | "vendor/bin/phpcs", 42 | "vendor/bin/phpstan analyze src" 43 | ], 44 | "inspect-fix": "vendor/bin/php-cs-fixer fix src", 45 | "insights" : "vendor/bin/phpmd src text phpmd.xml" 46 | }, 47 | "config": { 48 | "sort-packages": true, 49 | "allow-plugins": { 50 | "ocramius/package-versions": true 51 | } 52 | }, 53 | "extra": { 54 | "laravel": { 55 | "providers": [ 56 | "DanielWerner\\LaravelSchemaCrawler\\LaravelSchemaCrawlerServiceProvider" 57 | ], 58 | "aliases": { 59 | "SchemaCrawler": "DanielWerner\\LaravelSchemaCrawler\\LaravelSchemaCrawlerFacade" 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /config/config.php: -------------------------------------------------------------------------------- 1 | env('SCHEMACRAWLER_ROUTES_ENABLED', true), 9 | 10 | /* 11 | * The schemacrawler executable to use, on window schemacrawler.cmd can be used 12 | */ 13 | 'schemacrawler_executable' => 'schemacrawler.sh', 14 | 15 | /* 16 | * Info level for SchemaCrawler, possible values are: detailed, maximum, minimum, standard, unknown 17 | */ 18 | 'info_level' => 'standard', 19 | 20 | /* 21 | * The SchemaCrawler command, possible values are: count, details, dump, lint, list, quickdump, schema 22 | * For the details see the documentation in the readme. 23 | */ 24 | 'command' => 'schema', 25 | 26 | /* 27 | * The connection name to use for diagram generation 28 | */ 29 | 'connection' => 'default', 30 | 31 | /* 32 | * The name of the generated file 33 | */ 34 | 'output_file' => 'schema.pdf', 35 | 36 | /* 37 | * The output file type, possible values: pdf, png, svg, html 38 | */ 39 | 'output_format' => 'pdf', 40 | 41 | /* 42 | * The base path to generate the diagram files 43 | */ 44 | 'output_base_path' => storage_path('app'), 45 | ]; 46 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->string('email')->unique(); 20 | $table->string('password'); 21 | $table->rememberToken(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('users'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /phpcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | The PSR2 coding standard. 4 | 5 | src/ 6 | vendor 7 | resources 8 | database/ 9 | storage/ 10 | node_modules/ 11 | -------------------------------------------------------------------------------- /phpmd.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Inspired by https://github.com/phpmd/phpmd/issues/137 9 | using http://phpmd.org/documentation/creating-a-ruleset.html 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 47 | 3 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | tests 15 | 16 | 17 | 18 | 19 | src/ 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/Console/Commands/SchemaCrawlerCommand.php: -------------------------------------------------------------------------------- 1 | createArgumentsFromOptions()); 35 | $this->line('Generated diagram to '.$file); 36 | } 37 | 38 | /** 39 | * @return SchemaCrawlerArguments 40 | */ 41 | private function createArgumentsFromOptions(): SchemaCrawlerArguments 42 | { 43 | return new SchemaCrawlerArguments( 44 | $this->hasOption('output-file') ? $this->option('output-file') : null, 45 | $this->hasOption('output-format') ? $this->option('output-format') : null, 46 | $this->hasOption('connection') ? $this->option('connection') : null, 47 | $this->hasOption('info-level') ? $this->option('info-level') : null, 48 | $this->hasOption('command') ? $this->option('command') : null 49 | ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Facades/SchemaCrawler.php: -------------------------------------------------------------------------------- 1 | output_file, 28 | $request->output_format !== 'html' ? 'scdot' : $request->output_format, 29 | $request->connection, 30 | $request->info_level, 31 | $request->command 32 | ); 33 | } 34 | 35 | /** 36 | * @param Request $request 37 | * @return \Symfony\Component\HttpFoundation\BinaryFileResponse 38 | */ 39 | public function show(Request $request) 40 | { 41 | $outputFormat = $request->output_format ?? config('laravel-schemacrawler.output_format'); 42 | $file = SchemaCrawler::crawl($this->createArgumentsFromRequest($request)); 43 | $file = $this->convertOutputFile($outputFormat, $file); 44 | 45 | return response()->file($file)->deleteFileAfterSend(); 46 | } 47 | 48 | /** 49 | * @param string $outputFormat 50 | * @param string $file 51 | * @return string 52 | */ 53 | private function convertOutputFile(string $outputFormat, string $file): string 54 | { 55 | // Workaround, the schemacrawler cannot call the dot, when called from php using Valet. 56 | // It is necessary to generate the schema in scdot format, and manually convert the to the output format 57 | // @see: https://github.com/schemacrawler/SchemaCrawler/issues/179 58 | $process = new Process(['dot', '-T', $outputFormat, $file, '-o', $file]); 59 | $process->run(); 60 | 61 | return $file; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/Http/routes.php: -------------------------------------------------------------------------------- 1 | name('schema.show'); 6 | -------------------------------------------------------------------------------- /src/JDBC.php: -------------------------------------------------------------------------------- 1 | toArray(); 21 | $command = __DIR__.'/../bin/schemacrawler/'.config('laravel-schemacrawler.schemacrawler_executable'); 22 | array_unshift($crawlerArgumentsArray, $command); 23 | 24 | $process = new Process($crawlerArgumentsArray); 25 | $process->run(); 26 | 27 | if ($process->isSuccessful()) { 28 | return $arguments->getOutputFile(); 29 | } 30 | 31 | throw new ProcessFailedException($process); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/LaravelSchemaCrawlerServiceProvider.php: -------------------------------------------------------------------------------- 1 | loadRoutesFrom(__DIR__.'/Http/routes.php'); 22 | } 23 | 24 | if ($this->app->runningInConsole()) { 25 | $this->publishes([ 26 | __DIR__.'/../config/config.php' => config_path('laravel-schemacrawler.php'), 27 | ], 'config'); 28 | 29 | // Registering package commands. 30 | $this->commands([SchemaCrawlerCommand::class]); 31 | } 32 | } 33 | 34 | /** 35 | * Register the application services. 36 | * 37 | * @return void 38 | */ 39 | public function register(): void 40 | { 41 | // Automatically apply the package configuration 42 | $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'laravel-schemacrawler'); 43 | 44 | // Register the main class to use with the facade 45 | $this->app->singleton('laravel-schemacrawler', function () { 46 | return new LaravelSchemaCrawler; 47 | }); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/SchemaCrawlerArguments.php: -------------------------------------------------------------------------------- 1 | user = config('database.connections.'.$connection.'.username'); 49 | $this->password = config('database.connections.'.$connection.'.password'); 50 | $this->infoLevel = $infoLevel ?? config('laravel-schemacrawler.info_level'); 51 | $this->command = $command ?? 'schema'; 52 | 53 | $databaseDriver = config('database.connections.'.$connection.'.driver'); 54 | $host = config('database.connections.'.$connection.'.host'); 55 | $port = config('database.connections.'.$connection.'.port'); 56 | $this->url = JDBC::url($databaseDriver, $host, $port); 57 | 58 | $this->outputFile = config('laravel-schemacrawler.output_base_path').DIRECTORY_SEPARATOR. 59 | ($outputFile ?? config('laravel-schemacrawler.output_file')); 60 | 61 | $this->outputFormat = $outputFormat ?? config('laravel-schemacrawler.output_format'); 62 | $this->schemas = config('database.connections.'.$connection.'.database'); 63 | } 64 | 65 | /** 66 | * @return array 67 | */ 68 | public function toArray(): array 69 | { 70 | $arguments = []; 71 | 72 | foreach ($this as $key => $value) { 73 | $arguments[] = '--'.Str::snake($key, '-'); 74 | $arguments[] = $value; 75 | } 76 | 77 | return $arguments; 78 | } 79 | 80 | /** 81 | * @return string 82 | */ 83 | public function getOutputFile(): string 84 | { 85 | return $this->outputFile; 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /tests/Console/Commands/SchemaCrawlerCommandTest.php: -------------------------------------------------------------------------------- 1 | artisan('schema:generate') 23 | ->expectsOutput('Generated diagram to '.$expectedFile) 24 | ->assertExitCode(0); 25 | 26 | $this->assertTrue(file_exists($expectedFile)); 27 | } 28 | 29 | /** 30 | * @test 31 | * @dataProvider formatDataProvider 32 | */ 33 | public function get_schema_various_format($outputFile, $outputFormat) 34 | { 35 | $expectedFile = config('laravel-schemacrawler.output_base_path').'/'.$outputFile; 36 | 37 | $this->artisan('schema:generate', ['--output-format' => $outputFormat, '--output-file' => $outputFile]) 38 | ->expectsOutput('Generated diagram to '.$expectedFile) 39 | ->assertExitCode(0); 40 | 41 | $this->assertTrue(file_exists($expectedFile)); 42 | } 43 | 44 | public function formatDataProvider() 45 | { 46 | return [ 47 | ['test.pdf', 'pdf'], 48 | ['test.png', 'png'], 49 | ['test.html', 'html'], 50 | ['test.html', 'svg'], 51 | ]; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /tests/Http/Controllers/SchemaControllerTest.php: -------------------------------------------------------------------------------- 1 | get(route('schema.show')) 22 | ->assertStatus(200) 23 | ->assertHeader('content-type', 'application/pdf'); 24 | } 25 | 26 | /** 27 | * @test 28 | * @dataProvider formatDataProvider 29 | * @param string $outputFile 30 | * @param string $outputFormat 31 | * @param string $expectedContentType 32 | */ 33 | public function get_schema_various_formats($outputFile, $outputFormat, $expectedContentType): void 34 | { 35 | $params = [ 36 | 'output_file' => $outputFile, 37 | 'output_format' => $outputFormat, 38 | ]; 39 | 40 | $this->get(route('schema.show', $params)) 41 | ->assertStatus(200) 42 | ->assertHeader('content-type', $expectedContentType); 43 | } 44 | 45 | /** 46 | * @return array 47 | */ 48 | public function formatDataProvider(): array 49 | { 50 | return [ 51 | ['test.pdf', 'pdf', 'application/pdf'], 52 | ['test.png', 'png', 'image/png'], 53 | ['test.html', 'html', 'text/html; charset=UTF-8'], 54 | ['test.html', 'svg', 'image/svg+xml'], 55 | ]; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /tests/JDBCTest.php: -------------------------------------------------------------------------------- 1 | assertEquals($expectedUrl, $url); 25 | } 26 | 27 | /** 28 | * @test 29 | * @return void 30 | */ 31 | public function postgres_url(): void 32 | { 33 | $url = JDBC::url('pgsql', '127.0.0.1', 5740); 34 | $expectedUrl = 'jdbc:postgresql://127.0.0.1:5740?serverTimezone=UTC'; 35 | 36 | $this->assertEquals($expectedUrl, $url); 37 | } 38 | 39 | /** 40 | * @test 41 | * @return void 42 | */ 43 | public function sql_server_url(): void 44 | { 45 | $url = JDBC::url('sqlsrv', '127.0.0.1', 1433); 46 | $expectedUrl = 'jdbc:sqlserver://127.0.0.1:1433?serverTimezone=UTC'; 47 | 48 | $this->assertEquals($expectedUrl, $url); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /tests/SchemaCrawlerArgumentsTest.php: -------------------------------------------------------------------------------- 1 | toArray(); 30 | 31 | $connection = config('database.'.($connection ?? config('laravel-schemacrawler.connection'))); 32 | 33 | $expectedArguments = [ 34 | '--user', config('database.connections.'.$connection.'.username'), 35 | '--password', config('database.connections.'.$connection.'.password'), 36 | '--info-level', 'standard', 37 | '--command', 'schema', 38 | '--url', 'jdbc:mysql://127.0.0.1:3306?serverTimezone=UTC', 39 | '--output-file', storage_path('app/test.pdf'), 40 | '--output-format', 'pdf', 41 | '--schemas', 'crawl_test', 42 | ]; 43 | 44 | $this->assertEquals($expectedArguments, $arguments); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /tests/SchemaCrawlerTest.php: -------------------------------------------------------------------------------- 1 | assertTrue(file_exists($file)); 38 | unlink($file); 39 | } 40 | 41 | /** 42 | * @test 43 | * @dataProvider formatDataProvider 44 | * @param string|null $fileName 45 | * @param string|null $outputFormat 46 | */ 47 | public function schema_crawl_test_with_format_arguments($fileName, $outputFormat): void 48 | { 49 | $crawlerArguments = new SchemaCrawlerArguments($fileName, $outputFormat); 50 | 51 | $file = SchemaCrawler::crawl($crawlerArguments); 52 | 53 | $this->assertTrue(file_exists($file)); 54 | unlink($file); 55 | } 56 | 57 | /** 58 | * @return array 59 | */ 60 | public function formatDataProvider(): array 61 | { 62 | return [ 63 | ['test.pdf', 'pdf'], 64 | ['test.png', 'png'], 65 | ['test.html', 'html'], 66 | ['test.html', 'svg'], 67 | ]; 68 | } 69 | 70 | /** 71 | * @test 72 | * @return void 73 | */ 74 | public function schema_crawl_test_invalid_crawler_executable(): void 75 | { 76 | config(['laravel-schemacrawler.schemacrawler_executable' => 'non_existing']); 77 | 78 | $this->expectException(ProcessFailedException::class); 79 | SchemaCrawler::crawl(); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | SchemaCrawler::class, 33 | ]; 34 | } 35 | 36 | /** 37 | * Prepares the DB before running tests. 38 | * 39 | * @return void 40 | */ 41 | public function setUp(): void 42 | { 43 | parent::setUp(); 44 | 45 | config(['database.default' => 'mysql']); 46 | config([ 47 | 'database.connections.mysql' => [ 48 | 'driver' => 'mysql', 49 | 'host' => '127.0.0.1', 50 | 'port' => '3306', 51 | 'database' => 'crawl_test', 52 | 'username' => 'homestead', 53 | 'password' => 'secret', 54 | 'unix_socket' => '', 55 | 'charset' => 'utf8mb4', 56 | 'collation' => 'utf8mb4_unicode_ci', 57 | 'prefix' => '', 58 | 'strict' => true, 59 | 'engine' => null, 60 | ], 61 | ]); 62 | 63 | $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); 64 | $this->artisan('migrate')->run(); 65 | } 66 | } 67 | --------------------------------------------------------------------------------