Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyosukeKamei/58b40a35841b98bfe92b5ef29e769f88 to your computer and use it in GitHub Desktop.
Save RyosukeKamei/58b40a35841b98bfe92b5ef29e769f88 to your computer and use it in GitHub Desktop.
開発における悩ましいデータベース共有問題を解決するLaravelのマイグレーションとシーダーコマンド編~アジャイルでDevOpsなシステム構築実践~ ref: https://qiita.com/RyosukeKamei/items/49b2c6514a267da294b2
$ docker-compose exec {サービス名} php artisan make:seeder {任意の名前 例:***TableSeeder}
Seeder created successfully.
$ php artisan make:seeder {任意の名前 例:***TableSeeder}
Seeder created successfully.
$ docker exec -it {コンテナ名} php artisan make:seeder {任意の名前 例:***TableSeeder}
Seeder created successfully.
$ docker exec -it {コンテナ名} php artisan db:seed --class={任意の名前 例:***TableSeeder}
(特に成功メッセージなし)
$ docker exec -it {コンテナ名} php artisan make:model {モデル名} -m
$ 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