Fix V1DataMigrationSeeder for PostgreSQL

- Remove PRAGMA statements (SQLite-specific)
- PostgreSQL handles foreign keys automatically
This commit is contained in:
TheMaddax 2025-12-17 20:04:47 -07:00
parent 1b8679965e
commit 55a5165d20

View file

@ -25,10 +25,7 @@ class V1DataMigrationSeeder extends Seeder
*/
public function run(): void
{
// Disable foreign key checks for clean import
DB::statement('PRAGMA foreign_keys = OFF');
// Clear existing data
// Clear existing data (foreign keys handled by database)
Document::truncate();
DocketEntry::truncate();
Subscription::truncate();
@ -42,9 +39,6 @@ class V1DataMigrationSeeder extends Seeder
// Import subscriptions
$this->importSubscriptions();
// Re-enable foreign key checks
DB::statement('PRAGMA foreign_keys = ON');
$this->command->info('✅ v1.0 data migration complete!');
$this->command->info(' - Docket Entries: ' . DocketEntry::count());
$this->command->info(' - Documents: ' . Document::count());