drop unique constraint on name

This commit is contained in:
Dhravya Shah 2024-07-23 09:44:51 -05:00
parent f310781ad7
commit 9a36ec7a68
4 changed files with 900 additions and 820 deletions

View file

@ -70,7 +70,7 @@ CREATE TABLE `session` (
--> statement-breakpoint
CREATE TABLE `space` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`name` text DEFAULT 'none' NOT NULL,
`name` text NOT NULL,
`user` text(255),
`createdAt` integer NOT NULL,
`numItems` integer DEFAULT 0 NOT NULL,
@ -120,7 +120,6 @@ CREATE UNIQUE INDEX `authenticator_credentialID_unique` ON `authenticator` (`cre
CREATE INDEX `canvas_user_userId` ON `canvas` (`userId`);--> statement-breakpoint
CREATE INDEX `chatHistory_thread_idx` ON `chatHistory` (`threadId`);--> statement-breakpoint
CREATE INDEX `chatThread_user_idx` ON `chatThread` (`userId`);--> statement-breakpoint
CREATE UNIQUE INDEX `space_name_unique` ON `space` (`name`);--> statement-breakpoint
CREATE INDEX `spaces_name_idx` ON `space` (`name`);--> statement-breakpoint
CREATE INDEX `spaces_user_idx` ON `space` (`user`);--> statement-breakpoint
CREATE UNIQUE INDEX `storedContent_baseUrl_unique` ON `storedContent` (`baseUrl`);--> statement-breakpoint

File diff suppressed because it is too large Load diff

View file

@ -1,13 +1,13 @@
{
"version": "6",
"dialect": "sqlite",
"entries": [
{
"idx": 0,
"version": "6",
"when": 1720360287793,
"tag": "0000_exotic_sway",
"breakpoints": true
}
]
}
"version": "6",
"dialect": "sqlite",
"entries": [
{
"idx": 0,
"version": "6",
"when": 1721745865475,
"tag": "0000_stormy_catseye",
"breakpoints": true
}
]
}

View file

@ -148,7 +148,7 @@ export const space = createTable(
"space",
{
id: integer("id").notNull().primaryKey({ autoIncrement: true }),
name: text("name").notNull().unique().default("none"),
name: text("name").notNull(),
user: text("user", { length: 255 }).references(() => users.id, {
onDelete: "cascade",
}),