Skip to content

Instantly share code, notes, and snippets.

@PaulieScanlon
Created May 17, 2024 21:42
Show Gist options
  • Save PaulieScanlon/b262748f70208a1105a6159b59584ed3 to your computer and use it in GitHub Desktop.
Save PaulieScanlon/b262748f70208a1105a6159b59584ed3 to your computer and use it in GitHub Desktop.
Alter table example
- 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