@@ -2,12 +2,12 @@ import { relations, sql } from "drizzle-orm";
2
2
import { index , pgTable , timestamp , uuid , varchar } from "drizzle-orm/pg-core" ;
3
3
4
4
export const users = pgTable ( "users" , {
5
- id : uuid ( "id" ) . defaultRandom ( ) . primaryKey ( ) ,
6
- name : varchar ( "name" ) . notNull ( ) ,
7
- email : varchar ( "email" ) . notNull ( ) . unique ( ) ,
8
- password : varchar ( "password" , { length : 72 } ) . notNull ( ) ,
9
- createdAt : timestamp ( "created_at" , { withTimezone : true , precision : 3 } ) . default ( sql `CURRENT_TIMESTAMP` ) . notNull ( ) ,
10
- updatedAt : timestamp ( "updated_at" , { withTimezone : true , precision : 3 } ) . default ( sql `CURRENT_TIMESTAMP` ) . notNull ( ) ,
5
+ id : uuid ( ) . defaultRandom ( ) . primaryKey ( ) ,
6
+ name : varchar ( ) . notNull ( ) ,
7
+ email : varchar ( ) . notNull ( ) . unique ( ) ,
8
+ password : varchar ( { length : 72 } ) . notNull ( ) ,
9
+ createdAt : timestamp ( { withTimezone : true , precision : 3 } ) . default ( sql `CURRENT_TIMESTAMP` ) . notNull ( ) ,
10
+ updatedAt : timestamp ( { withTimezone : true , precision : 3 } ) . default ( sql `CURRENT_TIMESTAMP` ) . notNull ( ) ,
11
11
} , table => ( {
12
12
createdAtIdx : index ( ) . on ( table . createdAt ) ,
13
13
} ) ) ;
0 commit comments