Skip to content

Commit 4e2d5cd

Browse files
committed
Drop unused Nova-related tables from the database. Fixes #55. Fixes #56.
1 parent f634738 commit 4e2d5cd

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Support\Facades\Schema;
5+
6+
return new class extends Migration
7+
{
8+
public function up(): void
9+
{
10+
// Drop Nova-related tables that exist in the digitization_academy database.
11+
// Dropping attachments first, then notifications, then action log table.
12+
$tables = [
13+
'nova_pending_field_attachments',
14+
'nova_field_attachments',
15+
'nova_notifications',
16+
'action_events',
17+
];
18+
19+
foreach ($tables as $table) {
20+
Schema::dropIfExists($table);
21+
}
22+
}
23+
24+
public function down(): void
25+
{
26+
// Intentionally left blank:
27+
// Recreating Nova tables requires matching Nova's exact schema/version.
28+
// If you want reversibility, tell me your previous Nova version and I’ll write the table definitions.
29+
}
30+
};

0 commit comments

Comments
 (0)