migrationファイル名について
- Laravelのmigrationファイルは、ファイル名順に上から実行される
- migrationファイル名は、デフォルトだとランダムな数字がファイル名に付与されるが、ここを任意の数字に変えておくと視認性が増す
【例】
2023_08_20_000001_create_test1_table.php
2023_08_20_000002_create_test2_table.php
2023_08_20_000003_create_test3_table.php
☆ 同日の日付部分の後ろ(2023_08_20_ に続く部分)は、実行したい順序の番号
を付与しておくのがおすすめ