Skip to content

Commit

Permalink
Add "title" column to "user" table
Browse files Browse the repository at this point in the history
  • Loading branch information
m-abdelwahab committed Feb 1, 2024
1 parent e15b1c7 commit e4d4726
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 0 deletions.
1 change: 1 addition & 0 deletions drizzle/0001_high_victor_mancha.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "user" ADD COLUMN "title" text;
73 changes: 73 additions & 0 deletions drizzle/meta/0001_snapshot.json
Original file line number Diff line number Diff line change
@@ -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": {}
}
}
7 changes: 7 additions & 0 deletions drizzle/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
1 change: 1 addition & 0 deletions src/db/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
});

0 comments on commit e4d4726

Please sign in to comment.