Skip to content

Commit

Permalink
fix unique constraint error on dev env
Browse files Browse the repository at this point in the history
  • Loading branch information
LEstradioto committed Aug 16, 2024
1 parent fcfbba4 commit ac468f6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions database/seeders/StandaloneDockerSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ class StandaloneDockerSeeder extends Seeder
*/
public function run(): void
{
StandaloneDocker::create([
'id' => 0,
'name' => 'Standalone Docker 1',
'network' => 'coolify',
'server_id' => 0,
]);
if (StandaloneDocker::find(0) == null) {
StandaloneDocker::create([
'id' => 0,
'name' => 'Standalone Docker 1',
'network' => 'coolify',
'server_id' => 0,
]);
}
}
}

0 comments on commit ac468f6

Please sign in to comment.