Created
June 7, 2017 18:04
-
-
Save robsenshuu/c4459e8d4bb50d62f9f36d743c97d0e1 to your computer and use it in GitHub Desktop.
How to create a new migrate in laravel
This file contains 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 NEW COLUMN id_policy INTO TABLE | |
# action es - alter, update, create, add, drop, etc | |
# php artisan make:migration MIGRATION_NAME | |
# --table=TABLENAME in case alter an existing table | |
php artisan make:migration add_id_policy_documents --table=documents | |
# after we have to modify our new migrate and add in the UP function | |
$table->integer('id_policy')->nullable(); | |
# Also in DOWN function add | |
$table->dropColumn('id_policy'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment