fix: error in schema
Some checks failed
Deploy to GitHub Pages / build_site (push) Failing after 36s
Some checks failed
Deploy to GitHub Pages / build_site (push) Failing after 36s
This commit is contained in:
parent
ec037a3bbd
commit
7060b37df5
@ -12,7 +12,8 @@ CREATE TABLE "nodes" (
|
||||
"content" "bytea" NOT NULL,
|
||||
"definition" json NOT NULL,
|
||||
"hash" varchar(8) NOT NULL,
|
||||
"previous" varchar(8)
|
||||
"previous" varchar(8),
|
||||
CONSTRAINT "nodes_hash_unique" UNIQUE("hash")
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "nodes" ADD CONSTRAINT "nodes_userId_users_name_fk" FOREIGN KEY ("userId") REFERENCES "public"."users"("name") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"id": "e0d14457-de6a-4832-80fd-ee24523ff95c",
|
||||
"id": "b5fc8bcf-82d4-4d2e-bcd1-89d5a238f5e2",
|
||||
"prevId": "00000000-0000-0000-0000-000000000000",
|
||||
"version": "7",
|
||||
"dialect": "postgresql",
|
||||
@ -182,7 +182,15 @@
|
||||
}
|
||||
},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {},
|
||||
"uniqueConstraints": {
|
||||
"nodes_hash_unique": {
|
||||
"name": "nodes_hash_unique",
|
||||
"nullsNotDistinct": false,
|
||||
"columns": [
|
||||
"hash"
|
||||
]
|
||||
}
|
||||
},
|
||||
"policies": {},
|
||||
"checkConstraints": {},
|
||||
"isRLSEnabled": false
|
||||
|
@ -5,8 +5,8 @@
|
||||
{
|
||||
"idx": 0,
|
||||
"version": "7",
|
||||
"when": 1734695191817,
|
||||
"tag": "0000_wakeful_zodiak",
|
||||
"when": 1734695353420,
|
||||
"tag": "0000_steep_bromley",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
|
@ -27,7 +27,7 @@ export const nodeTable = pgTable("nodes", {
|
||||
nodeId: varchar().notNull(),
|
||||
content: bytea().notNull(),
|
||||
definition: json().notNull(),
|
||||
hash: varchar({ length: 8 }).notNull(),
|
||||
hash: varchar({ length: 8 }).notNull().unique(),
|
||||
previous: varchar({ length: 8 }),
|
||||
}, (table) => [
|
||||
foreignKey({
|
||||
|
Loading…
x
Reference in New Issue
Block a user