Repository navigation
Replies: 3 comments 1 reply
database_path('migrations/'.date('Y_m_d_His', time()).'_create_ratings_table.php')This pattern might work well before Laravel moves to |
|
Hmm, so I just changed it to __DIR__.'/../workbench/database/migrations/2023_09_16_003400_create_ratings_table.php' => database_path('migrations/0000_00_00_000000_create_ratings_table.php'),But INFO Running migrations.
0000_00_00_000000_create_ratings_table .............................................................................. 4ms DONE
2014_10_12_000000_testbench_create_users_table ...................................................................... 1ms DONE
2014_10_12_100000_testbench_create_password_reset_tokens_table ...................................................... 0ms DONE
2019_08_19_000000_testbench_create_failed_jobs_table ................................................................ 1ms DONE
2023_09_14_230134_create_ratings_table .............................................................................. 1ms FAILNot sure where I checked Is this the right way to do the migrations in the testbench package, or have I missed anything? Thanks for the pointer! |
|
This is an issue with any packages using Before this, each migrations has a unique class name and Laravel will throw duplicate class exception if you try publishing package migrations more than once, and it's no longer possible with You can use |
Uh oh!
There was an error while loading. Please reload this page.
Description:
When I run either of
testbench workbench:buildtestbench package:testpest --filter="some test"I get an error saying that a table already exists
Steps To Reproduce:
I'm trying to do this on my package https://github.com/cjmellor/rating
I have a
create_ratings_table.phpfile withindatabase/migrations.My
testbench.yamlfile:This is the Service Provider
This is the TestCase.php code:
I ran both
testbench workbench:installtestbench workbench:buildWhich gives me an output:
It seems the migration is generated twice and trying to run twice.
Cannot for the life of me figure out why.
Thanks for taking the time to look.
All reactions