Add project revision foundation

This commit is contained in:
2026-07-23 21:17:48 +02:00
parent 6b6d2c2a42
commit 903d977443
16 changed files with 2052 additions and 9 deletions
+19
View File
@@ -0,0 +1,19 @@
import { integer, sqliteTable, text, unique } from "drizzle-orm/sqlite-core";
import { projectRevisions } from "./project-revisions.js";
export const projectChangeSets = sqliteTable(
"project_change_sets",
{
id: text("id").primaryKey(),
projectRevisionId: text("project_revision_id")
.notNull()
.references(() => projectRevisions.id, { onDelete: "cascade" }),
commandType: text("command_type").notNull(),
payloadSchemaVersion: integer("payload_schema_version").notNull(),
forwardPayloadJson: text("forward_payload_json").notNull(),
inversePayloadJson: text("inverse_payload_json").notNull(),
},
(table) => [
unique("project_change_sets_revision_unique").on(table.projectRevisionId),
]
);