![]() |
![]()
| ![]() |
![]()
NAMEGitDDL::Migrator - database migration utility for git managed SQL extended GitDDL SYNOPSISuse GitDDL::Migrator; my $gd = GitDDL::Migrator->new( work_tree => '/path/to/project', # git working directory ddl_file => 'sql/schema_ddl.sql', dsn => ['dbi:mysql:my_project', 'root', ''], ); DESCRIPTIONGitDDL::Migrator is database migration utility extended GitDDL. GitDDL is very cool module. It's very simple and developer friendly. I use it in development, but features of it are not enough in operation phase. Features needed at operation phases are: e.g.
Then for solving them, I wrote GitDDL::Migrator. METHODS"GitDDL::Migrator->new(%options)"Create GitDDL::Migrator object. Available options are:
"$gd->migrate(%opt)"migrate database "$gd->real_diff"display differences from versioned DDL and real database setting. "$gd->diff_to_real_database"alias of "real_diff" "$gd->diff_from_real_database"display differences from real database setting and versioned DDL. "$gd->check_ddl_mismatch"check differences from versioned DDL and real database setting. "$gd->get_rollback_version"get previous database version. "$gd->rollback_diff"display differences SQL from current version and previous version. "$gd->create_version_table"Only create version table, don't deploy any other SQLs. It is useful to apply "GitDDL::Migrator" to existing databases. LICENSECopyright (C) Masayuki Matsuki. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. AUTHORMasayuki Matsuki <y.songmu@gmail.com>
|