feat: migration-tool (#269)

* feat: working on migration backup tool

* feat: add migration sequences

* fix: responsive for migration tool

* fix: truncate database name in migration

* fix: filter on databases success for migration tool

---------

Co-authored-by: charles-gauthereau <charles.gauthereau@soluce-technologies.com>
This commit is contained in:
Charles GTE
2026-04-29 22:39:37 +02:00
committed by GitHub
co-authored by charles-gauthereau
parent ab55ab349a
commit ff28a80d7c
20 changed files with 4133 additions and 14 deletions
@@ -0,0 +1 @@
ALTER TABLE "backups" ADD COLUMN "migrated" boolean DEFAULT false;
File diff suppressed because it is too large Load Diff
+7
View File
@@ -372,6 +372,13 @@
"when": 1775803959723,
"tag": "0052_cute_punisher",
"breakpoints": true
},
{
"idx": 53,
"version": "7",
"when": 1777204042208,
"tag": "0053_lyrical_union_jack",
"breakpoints": true
}
]
}
+7 -1
View File
@@ -3,7 +3,7 @@ import {relations} from "drizzle-orm";
import {Organization, organization} from "./03_organization";
import {createSelectSchema} from "drizzle-zod";
import {z} from "zod";
import {Database, database} from "./07_database";
import {Database, database, DatabaseWith} from "./07_database";
import {timestamps} from "@/db/schema/00_common";
export const project = pgTable("projects", {
@@ -32,3 +32,9 @@ export type ProjectWith = Project & {
databases: Database[];
organization: Organization;
};
export type ProjectWithDatabasesAndBackups = Project & {
databases: DatabaseWith[];
organization: Organization;
};
+1
View File
@@ -42,6 +42,7 @@ export const backup = pgTable(
.notNull()
.references(() => database.id, {onDelete: "cascade"}),
imported: boolean('imported').default(false),
migrated: boolean('migrated').default(false),
...timestamps
},
);