For example, if you have a file 2016_06_21_200145_create_notes_table.php and modify the content, it will take effect if you manually rename the number 200145 and then execute phpartisanmigrate. For example, a file
2016_06_21_200145_create_notes_table.php
, If I manually rename and modify the modified content
200145
Execute this number again
Php artisan migrate
Yes, but I don't know if this rule works.
Reply content:
For example, a file2016_06_21_200145_create_notes_table.php
, If I manually rename and modify the modified content200145
Execute this number againPhp artisan migrate
Yes, but I don't know if this rule works.
Every time you execute php artisan migrate, the migrate file will be recorded in the migrations table in the database. changing the file name is equivalent to creating a new file.
If you want to modify the table after creating the table, you can use the 2016_06_21_222145_update_notes_table.php file to change the table structure,
You can modify the table structure multiple times by adding the year, month, and Day (2016_06_21_232145_update_notes_table20160621.php) after the table.
Note that the modified date and random number must be sequential.