Created
December 13, 2017 06:56
-
-
Save RyosukeKamei/58b40a35841b98bfe92b5ef29e769f88 to your computer and use it in GitHub Desktop.
開発における悩ましいデータベース共有問題を解決するLaravelのマイグレーションとシーダーコマンド編~アジャイルでDevOpsなシステム構築実践~ ref: https://qiita.com/RyosukeKamei/items/49b2c6514a267da294b2
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
$ docker-compose exec {サービス名} php artisan make:seeder {任意の名前 例:***TableSeeder} | |
Seeder created successfully. |
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
$ php artisan make:seeder {任意の名前 例:***TableSeeder} | |
Seeder created successfully. |
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
$ docker exec -it {コンテナ名} php artisan make:seeder {任意の名前 例:***TableSeeder} | |
Seeder created successfully. |
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
$ docker exec -it {コンテナ名} php artisan db:seed --class={任意の名前 例:***TableSeeder} | |
(特に成功メッセージなし) |
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
$ docker exec -it {コンテナ名} php artisan make:model {モデル名} -m |
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
$ docker exec -it {コンテナ名} php artisan migrate | |
Migrating: {マイグレーションファイル名} | |
Migrated: {マイグレーションファイル名} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment