Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kevindew/sfdoctrinemysqlsafemigrateplugin
A plugin for symfony to allow doctrine to migrate database versions on MySQL whilst being able to rollback to previous database state on an error
https://github.com/kevindew/sfdoctrinemysqlsafemigrateplugin
Last synced: 20 days ago
JSON representation
A plugin for symfony to allow doctrine to migrate database versions on MySQL whilst being able to rollback to previous database state on an error
- Host: GitHub
- URL: https://github.com/kevindew/sfdoctrinemysqlsafemigrateplugin
- Owner: kevindew
- License: mit
- Created: 2010-11-11T15:33:55.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2011-08-05T19:05:30.000Z (over 13 years ago)
- Last Synced: 2024-10-05T01:41:14.312Z (about 1 month ago)
- Language: PHP
- Homepage:
- Size: 129 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
sfDoctrineMysqlSafeMinifyPlugin
===============================This plugin is to ease the usage of Doctrine migrations with MySQL database by
adding the ability to roll back on an error.Doctrine migrations are designed to roll back to the previous state when an
error occurs but this cannot happen with MySQL (at least InnoDB) because of
implicit commits on structure altering queries. To counter this problem this
plugin uses mysqldump to get a snapshot of your database before the migration
and then in the event of an error or a migration dry run the backup will be
restored.Because of the nature of a database backup and a restore, there is the
possibility for dataloss during the process of running a migration, with a
large database this could of course make the process very slow. The primary
usage of this plugin is for in a dev/test environment to ensure migration
classes are accurate.Installation
------------* Install as SVN External:
In shell
$ svn pe svn:externals
then add
sfDoctrineMysqlSafeMigratePlugin http://svn.github.com/kevindew/sfDoctrineMysqlSafeMigratePlugin.git
Activate plugin in ProjectConfiguration::Setup
$this->enablePlugins('sfDoctrineMysqlSafeMigratePlugin');* Install From files
Download contents to
plugins/sfDoctrineMysqlSafeMigratePlugin
Activate plugin in ProjectConfiguration::Setup
$this->enablePlugins('sfDoctrineMysqlSafeMigratePlugin');Then in config/app.yml define the paths to your mysqldump and mysql for each
environmentDefaults are:
default:
sfDoctrineMysqlSafeMigratePlugin:
mysql_dump_path: mysqldump
mysql_path: mysqlUsage
-----Once installed the task is ran by using doctrine:mysql-safe-migrate instead of
doctrine:migrate. For further info type:
./symfony help doctrine:mysql-safe-migrate