Skip to content

Commit

Permalink
Merge pull request giselles-ai#280 from toyamarinyon/set-team-id-not-…
Browse files Browse the repository at this point in the history
…null

fix(schema): Add NOT NULL constraint to teams.id column
  • Loading branch information
shige authored Dec 26, 2024
2 parents 62cfda6 + b5896be commit 80a8e99
Show file tree
Hide file tree
Showing 6 changed files with 2,152 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drizzle/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const subscriptions = pgTable("subscriptions", {

type TeamType = "customer" | "internal";
export const teams = pgTable("teams", {
id: text("id").$type<TeamId>().unique(),
id: text("id").$type<TeamId>().notNull().unique(),
dbId: serial("db_id").primaryKey(),
name: text("name").notNull(),
createdAt: timestamp("created_at").defaultNow().notNull(),
Expand Down
1 change: 1 addition & 0 deletions migrations/0023_colossal_nuke.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "teams" ALTER COLUMN "id" SET NOT NULL;
Loading

0 comments on commit 80a8e99

Please sign in to comment.