Yii2 Migration Versions Save

Yii 2 Migration Creator And Updater

4.4.1

8 months ago

Code cleaning and removing unnecessary docs,

4.4.0

1 year ago

Added new action sql allowing to extract SQL statements from the given migration file. Usage examples:

  • yii migration/sql migration_name
  • yii migration/sql migration_name up
  • yii migration/sql migration_name down

4.3.1

2 years ago
  • Fixed order in which updating statements are rendered in the migration.
  • Used safeUp() instead of up() and safeDown() instead of down() in the migration template to match changes in default Yii behavior.

Thank you, @naduvko for reporting these.

4.3.0

2 years ago
  • When multiple migrations are generated they are not saved with additional _n_ stamp (when n is the number of the next migration) anymore. Instead they are saved with just the timestamp that is not repeated for other migrations in the batch. Thanks to that it is safe to run migrate/mark, migrate/to, and similar Yii commands with such migrations. In case there are possible timestamp collisions with existing migrations user will get a warning first.
  • Added leeway (lw) option to add seconds to the starting timestamp for migrations generation.
  • Fixed issue with foreign key autoindex generated for MySQL update migrations comparison.

Many thanks to @karolls for reporting these cases.

4.2.0

2 years ago
  • Added fileMode option to set the file permissions for generated migrations (int|string|null, default null, expects integer value like 0777 or integerish string convertable to integer).
  • Added fileOwnership option to set the file ownership for generated migrations (string|int|array<int|string, int|string>|null, default null, can be integer user id, string user name, string user:group combination, string user: or :group only, or array with [user, group] or ['user' => user, 'group' => group] data).
  • Changing file permission and group is done through Yii 2.0.43 FileHelper::changeOwnership() or the internal fallback in case of older Yii versions.
  • Refactored some code a bit.
  • Added more tests.
  • Improved mutation score.

4.1.4

3 years ago
  • Yii's autoloader is not required to be pre-wired to an app anymore.
  • Fixed bug with not reusing DB connection for updates.

4.1.3

3 years ago

Ensured MySQL 8 compatibility.

4.1.2

3 years ago

Fixed bug with handling renamed table migration.

3.6.6

3 years ago

v4 suggested.

2.9.6

3 years ago

v4 suggested.