inlm / schema-generator-dibi
Dibi bridge for inlm/schema-generator
Fund package maintenance!
Other
Requires
- php: >=5.6.0
- dibi/dibi: ^3.0 || ^4.0
- inlm/schema-generator: ^1.0
Requires (Dev)
- nette/tester: ^2.0
This package is auto-updated.
Last update: 2024-12-10 08:11:09 UTC
README
Installation
Download a latest package or use Composer:
composer require inlm/schema-generator-dibi
Schema Generator requires PHP 5.6.0 or later and Dibi 3.0 or newer.
Documentation
Supported databases:
- MySQL
DibiExtractor
It generates schema from existing database.
$connection = new Dibi\Connection(...); $ignoredTables = ['migrations']; $extractor = new Inlm\SchemaGenerator\DibiBridge\DibiExtractor($connection, $ignoredTables);
DibiAdapter
It loads schema from existing database.
$connection = new Dibi\Connection(...); $ignoredTables = ['migrations']; $extractor = new Inlm\SchemaGenerator\DibiBridge\DibiAdapter($connection, $ignoredTables);
Note: saving of schema is not supported, use DibiDumper
.
DibiDumper
DibiDumper
executes SQL queries directly in database.
$connection = new Dibi\Connection(...); $dumper = new Inlm\SchemaGenerator\DibiBridge\DibiDumper($connection); $dumper->setHeader(array( 'SET foreign_key_checks = 1;', ));
If you need generate ... AFTER column
in ALTER TABLE
statements, call:
$dumper->enablePositionChanges();
License: New BSD License
Author: Jan Pecha, https://www.janpecha.cz/