Created
September 19, 2017 17:04
-
-
Save nabeeljaved/0aa7b52fc0a3f365ea2a46d2d2c2defe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Add your database connection settings to protected/config/console.php. | |
| Run yiic migrate create initial to create the stub code for the migration. | |
| Copy contents of this gist to protected/commands/InitialDbMigrationCommand.php. | |
| Run yiic initialdbmigration 'name_of_your_database' > initial_migration.php to generate up() and down() methods for initial database migration. | |
| Copy and paste up() and down() methods from initial_migration.php to the file created in the protected/migrations folder in step 2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment