feat: add manufacturers table to schema
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
12
drizzle-pg/0007_steady_sasquatch.sql
Normal file
12
drizzle-pg/0007_steady_sasquatch.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
CREATE TABLE "manufacturers" (
|
||||
"id" serial PRIMARY KEY NOT NULL,
|
||||
"name" text NOT NULL,
|
||||
"slug" text NOT NULL,
|
||||
"website" text NOT NULL,
|
||||
"tier" integer DEFAULT 1 NOT NULL,
|
||||
"active" boolean DEFAULT true NOT NULL,
|
||||
"country" text,
|
||||
"created_at" timestamp DEFAULT now() NOT NULL,
|
||||
CONSTRAINT "manufacturers_name_unique" UNIQUE("name"),
|
||||
CONSTRAINT "manufacturers_slug_unique" UNIQUE("slug")
|
||||
);
|
||||
1683
drizzle-pg/meta/0007_snapshot.json
Normal file
1683
drizzle-pg/meta/0007_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -50,6 +50,13 @@
|
||||
"when": 1776096142720,
|
||||
"tag": "0006_remarkable_susan_delgado",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 7,
|
||||
"version": "7",
|
||||
"when": 1776516850497,
|
||||
"tag": "0007_steady_sasquatch",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
boolean,
|
||||
doublePrecision,
|
||||
integer,
|
||||
pgTable,
|
||||
@@ -20,6 +21,19 @@ export const users = pgTable("users", {
|
||||
createdAt: timestamp("created_at").defaultNow().notNull(),
|
||||
});
|
||||
|
||||
// ── Manufacturers ────────────────────────────────────────────────────
|
||||
|
||||
export const manufacturers = pgTable("manufacturers", {
|
||||
id: serial("id").primaryKey(),
|
||||
name: text("name").notNull().unique(),
|
||||
slug: text("slug").notNull().unique(),
|
||||
website: text("website").notNull(),
|
||||
tier: integer("tier").notNull().default(1),
|
||||
active: boolean("active").notNull().default(true),
|
||||
country: text("country"),
|
||||
createdAt: timestamp("created_at").defaultNow().notNull(),
|
||||
});
|
||||
|
||||
// ── Categories ──────────────────────────────────────────────────────
|
||||
|
||||
export const categories = pgTable(
|
||||
|
||||
Reference in New Issue
Block a user