Skip to content

Conversation

@Endy-c
Copy link

@Endy-c Endy-c commented Sep 2, 2022

When using the --database parameter specify a connection different from the default one, seeder file didn't specifies the same connection, that might cause an unexpected error and would make CRITICAL mistake(if there's a table has same name in the default connection).

/**
* @todo append records to exists table only instead of deleting table before seeding.
**/
- \DB::table('bar')->delete();
+ \DB::connection('foo')->table('bar')->delete();
-\DB::table('bar')->insert(array (
+\DB::connection('foo')->table('bar')->insert(array (

@arvigJustinBarber
Copy link

arvigJustinBarber commented Jun 14, 2023

@tihomiro Is there something missing with the PR that is blocking the merge? I have been looking for this fix for a long time.

@Endy-c
Copy link
Author

Endy-c commented Jun 15, 2023

@tihomiro Is there something missing with the PR that is blocking the merge? I have been looking for this fix for a long time.

It's been so long that I can't even recall making this modification, :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants