From acd15bc3e421f6598a568e0525f3d04ae7326765 Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 4 Sep 2020 16:23:58 -0700 Subject: [PATCH] Fixed DB seeder to truncate the asset_maintenances table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This wouldn’t have affected anything in production, but could cause some weird behavior if re-seeding often, since the suppliers table gets stomped on but the old maintenances remained, leaving ghost entries and associating the wrong (old, now defunct) supplier with the maintenance as new supplier IDs get generated. --- database/seeds/DatabaseSeeder.php | 1 + 1 file changed, 1 insertion(+) diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index 1da491a00..338724b65 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -48,6 +48,7 @@ class DatabaseSeeder extends Seeder Model::reguard(); DB::table('imports')->truncate(); + DB::table('asset_maintenances')->truncate(); } }