W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
使用 make:migration
Artisan 命令 命令來創(chuàng)建遷移:
php artisan make:migration create_users_table
提示:遷移 stubs 必須使用 stub publishing 進行自定義。
--table
和 --create
選項也可用于確定表的名稱以及是否在遷移中創(chuàng)建新的數(shù)據(jù)表。這些選項用指定的遷移模板預(yù)先填充指定的數(shù)據(jù)表:
php artisan make:migration create_users_table --create=users
php artisan make:migration add_votes_to_users_table --table=users
這里提到的操作,是將會為生成的遷移文件指定自定義的輸出路徑,您在執(zhí)行 make:migration
命令時,可以嘗試使用 --path
參數(shù)。 給定的路徑是以應(yīng)用程序文件夾為相對路徑。
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: