Skip to content

Instantly share code, notes, and snippets.

@cebe
Last active January 4, 2017 15:33
Show Gist options
  • Save cebe/8a0d29d3861bd22cd4cd to your computer and use it in GitHub Desktop.
Save cebe/8a0d29d3861bd22cd4cd to your computer and use it in GitHub Desktop.
include yii2 extension migration into the application migration chain
<?php
// require the extension migration file
require(__DIR__ . '/../vendor/path/to/extension/migration/yymmsshhiiss_extension_migration.php');
// or if you want to use alias
//require(Yii::getAlias('@vendor/path/to/extension/migration/yymmsshhiiss_extension_migration.php'));
class yymmsshhiiss_my_extension_migration extends yymmsshhiiss_extension_migration
{
// no implementation needed
}
@Senegal
Copy link

Senegal commented Jan 4, 2017

what about dir with migration files? what's best practice to include all of them in one file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment