For example, there is such a file 2016_06_21_200145_create_notes_table.php
. After modifying the content, if I manually rename and modify the number 200145
and then execute php artisan migrate
, it will take effect, but I don’t know if this is standardized.
For example, there is such a file 2016_06_21_200145_create_notes_table.php
. After modifying the content, if I manually rename and modify the number 200145
and then execute php artisan migrate
, it will take effect, but I don’t know if this is standardized.
Every time php artisan migrate is executed, the migrate file will be recorded in the migrations table in the database. Changing the file name is equivalent to re-creating a file.
If you want to modify the table after creating it, you can change the table structure through the 2016_06_21_222145_update_notes_table.php file.
To modify the table structure multiple times, you need to add the preceding year, month and day after the table (i.e. 2016_06_21_232145_update_notes_table20160621.php). Change the table structure multiple times.
It should be noted that the modified date and random number must be in order.