From e4d47268b5302674aab0c782c12cff3e7f417153 Mon Sep 17 00:00:00 2001 From: Mahmoud Abdelwahab Date: Thu, 1 Feb 2024 10:11:52 +0200 Subject: [PATCH] Add "title" column to "user" table --- drizzle/0001_high_victor_mancha.sql | 1 + drizzle/meta/0001_snapshot.json | 73 +++++++++++++++++++++++++++++ drizzle/meta/_journal.json | 7 +++ src/db/schema.ts | 1 + 4 files changed, 82 insertions(+) create mode 100644 drizzle/0001_high_victor_mancha.sql create mode 100644 drizzle/meta/0001_snapshot.json diff --git a/drizzle/0001_high_victor_mancha.sql b/drizzle/0001_high_victor_mancha.sql new file mode 100644 index 0000000..d6d25ad --- /dev/null +++ b/drizzle/0001_high_victor_mancha.sql @@ -0,0 +1 @@ +ALTER TABLE "user" ADD COLUMN "title" text; \ No newline at end of file diff --git a/drizzle/meta/0001_snapshot.json b/drizzle/meta/0001_snapshot.json new file mode 100644 index 0000000..b2d6d6f --- /dev/null +++ b/drizzle/meta/0001_snapshot.json @@ -0,0 +1,73 @@ +{ + "id": "1ebb0eab-1bed-4f4f-b3c5-bd0aa1d8363f", + "prevId": "82aee2f3-0a69-43a7-ae90-c5b40ac2d1cf", + "version": "5", + "dialect": "pg", + "tables": { + "user": { + "name": "user", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + } + }, + "enums": {}, + "schemas": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index c219c27..09e7630 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -8,6 +8,13 @@ "when": 1706770281659, "tag": "0000_goofy_gabe_jones", "breakpoints": true + }, + { + "idx": 1, + "version": "5", + "when": 1706775090951, + "tag": "0001_high_victor_mancha", + "breakpoints": true } ] } \ No newline at end of file diff --git a/src/db/schema.ts b/src/db/schema.ts index 5b21662..9f72315 100644 --- a/src/db/schema.ts +++ b/src/db/schema.ts @@ -8,4 +8,5 @@ export const users = pgTable("user", { role: text("role").$type<"admin" | "customer">(), createdAt: timestamp("created_at"), updatedAt: timestamp("updated_at"), + title: text("title"), });