Created
May 17, 2024 21:42
-
-
Save PaulieScanlon/b262748f70208a1105a6159b59584ed3 to your computer and use it in GitHub Desktop.
Alter table example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- import { pgTable, serial, varchar } from 'drizzle-orm/pg-core'; | |
+ import { pgTable, serial, varchar, date } from 'drizzle-orm/pg-core'; | |
export const users = pgTable('users', { | |
user_id: serial('user_id').primaryKey(), | |
first_name: varchar('first_name', { length: 100 }), | |
last_name: varchar('last_name', { length: 100 }), | |
email: varchar('email', { length: 80 }).unique(), | |
role: varchar('role', { length: 20 }), | |
+ date_of_birth: date('date_of_birth') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment