mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-21 00:05:49 +02:00
Regenerate lifecycle migration after rebasing master
Master now owns migration numbers 0301 and 0302. Generate the lifecycle delivery schema as 0303, retain the atomic baseline and restore repair, and update migration references. The migration snapshot, lifecycle, and legacy restore tests pass. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
5 files changed
+1489
-6
No files matched your search
@@ -271,7 +271,7 @@ describePostgres("Resource lifecycle events", () => {
|
||||
});
|
||||
|
||||
const backfillBaseline = () => db.transaction(async tx => {
|
||||
const migration = readFileSync(new URL("../../../packages/db/src/migrations/0301_whole_venom.sql", import.meta.url), "utf8");
|
||||
const migration = readFileSync(new URL("../../../packages/db/src/migrations/0303_modern_mathemanic.sql", import.meta.url), "utf8");
|
||||
const lock = migration.split("--> statement-breakpoint")[0];
|
||||
const baseline = migration.slice(migration.indexOf("-- Seed a one-time current-state baseline"));
|
||||
for (const statement of [lock, ...baseline.split("--> statement-breakpoint")]) {
|
||||
@@ -326,7 +326,7 @@ describePostgres("Resource lifecycle events", () => {
|
||||
await db.execute(sql`DROP TABLE plugin_lifecycle_acknowledgments`);
|
||||
await db.execute(sql`DROP INDEX resource_lifecycle_events_resource_order_idx`);
|
||||
const applyDeliveryMigration = () => db.transaction(async tx => {
|
||||
const migration = readFileSync(new URL("../../../packages/db/src/migrations/0301_whole_venom.sql", import.meta.url), "utf8");
|
||||
const migration = readFileSync(new URL("../../../packages/db/src/migrations/0303_modern_mathemanic.sql", import.meta.url), "utf8");
|
||||
for (const statement of migration.split("--> statement-breakpoint")) {
|
||||
if (statement.trim()) await tx.execute(sql.raw(statement));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user