feat: give plugins their own tables, migrations and sync entities

This commit is contained in:
LukeGus committed 2026-09-22 15:49:54 -05:00
1 parent 5796186a1c
commit c496a093ca
47 files changed
+32595 -290

No files matched your search

@@ -0,0 +1,11 @@
CREATE TABLE `plugin_migrations` (
`id` int AUTO_INCREMENT NOT NULL,
`plugin_id` varchar(255) NOT NULL,
`migration_id` varchar(255) NOT NULL,
`checksum` text NOT NULL,
`applied_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
CONSTRAINT `plugin_migrations_id` PRIMARY KEY(`id`),
CONSTRAINT `idx_plugin_migrations_plugin_migration` UNIQUE(`plugin_id`,`migration_id`)
);
--> statement-breakpoint
ALTER TABLE `plugin_migrations` ADD CONSTRAINT `plugin_migrations_plugin_id_plugins_id_fk` FOREIGN KEY (`plugin_id`) REFERENCES `plugins`(`id`) ON DELETE cascade ON UPDATE no action;
File diff suppressed because it is too large. Load diff
+7
View File
@@ -190,6 +190,13 @@
"when": 1790102859925,
"tag": "0026_empty_black_bird",
"breakpoints": true
},
{
"idx": 27,
"version": "5",
"when": 1790109037476,
"tag": "0027_watery_multiple_man",
"breakpoints": true
}
]
}
+10
View File
@@ -0,0 +1,10 @@
CREATE TABLE "plugin_migrations" (
"id" serial PRIMARY KEY NOT NULL,
"plugin_id" varchar(255) NOT NULL,
"migration_id" varchar(255) NOT NULL,
"checksum" text NOT NULL,
"applied_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
);
--> statement-breakpoint
ALTER TABLE "plugin_migrations" ADD CONSTRAINT "plugin_migrations_plugin_id_plugins_id_fk" FOREIGN KEY ("plugin_id") REFERENCES "public"."plugins"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
CREATE UNIQUE INDEX "idx_plugin_migrations_plugin_migration" ON "plugin_migrations" USING btree ("plugin_id","migration_id");
File diff suppressed because it is too large. Load diff
+7
View File
@@ -197,6 +197,13 @@
"when": 1790102859387,
"tag": "0027_sharp_guardian",
"breakpoints": true
},
{
"idx": 28,
"version": "7",
"when": 1790109036999,
"tag": "0028_whole_zemo",
"breakpoints": true
}
]
}
+10
View File
@@ -0,0 +1,10 @@
CREATE TABLE `plugin_migrations` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`plugin_id` text NOT NULL,
`migration_id` text NOT NULL,
`checksum` text NOT NULL,
`applied_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
FOREIGN KEY (`plugin_id`) REFERENCES `plugins`(`id`) ON UPDATE no action ON DELETE cascade
);
--> statement-breakpoint
CREATE UNIQUE INDEX `idx_plugin_migrations_plugin_migration` ON `plugin_migrations` (`plugin_id`,`migration_id`);
File diff suppressed because it is too large. Load diff
+7
View File
@@ -169,6 +169,13 @@
"when": 1790102858837,
"tag": "0023_talented_shooting_star",
"breakpoints": true
},
{
"idx": 24,
"version": "6",
"when": 1790109036510,
"tag": "0024_public_hemingway",
"breakpoints": true
}
]
}