Skip to content

Commit

Permalink
add unique constraint to file.path
Browse files Browse the repository at this point in the history
On conflict methods are otherwise not possible. And, it's logical that a path should be unique (as long as we have a "a file only has one path" constraints opral/inlang-sdk#140)
  • Loading branch information
samuelstroschein committed Aug 30, 2024
1 parent 79053af commit 5c4a759
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lix/packages/sdk/src/database/createSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function createSchema(args: { db: Kysely<any> }) {
CREATE TABLE file_internal (
id TEXT PRIMARY KEY DEFAULT (uuid_v4()),
path TEXT NOT NULL,
path TEXT NOT NULL UNIQUE,
data BLOB NOT NULL
) strict;
Expand Down

0 comments on commit 5c4a759

Please sign in to comment.