File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed
Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -550,8 +550,10 @@ export interface CourseUsuario {
550550export interface GuideUsuario {
551551 actividadpf_id : number ;
552552 amountpaid : number ;
553+ created_at : Timestamp | null ;
553554 points : number ;
554555 profilescore : number ;
556+ updated_at : Timestamp | null ;
555557 usuario_id : number ;
556558}
557559
@@ -1258,6 +1260,15 @@ export interface Ubitransactions {
12581260 wallet : string ;
12591261}
12601262
1263+ export interface Userevent {
1264+ created_at : Timestamp ;
1265+ event_data : Json | null ;
1266+ event_type : string ;
1267+ id : Generated < Int8 > ;
1268+ updated_at : Timestamp ;
1269+ usuario_id : number ;
1270+ }
1271+
12611272export interface Usuario {
12621273 created_at : Timestamp | null ;
12631274 current_sign_in_at : Timestamp | null ;
@@ -1415,5 +1426,6 @@ export interface DB {
14151426 religion : Religion ;
14161427 schema_migrations : SchemaMigrations ;
14171428 ubitransactions : Ubitransactions ;
1429+ userevent : Userevent ;
14181430 usuario : Usuario ;
14191431}
Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ export async function up(db: Kysely<any>): Promise<void> {
77 . addColumn ( 'updated_at' , 'timestamp' )
88 . execute ( )
99 await db . schema
10- . createTable ( 'user_event ' )
11- . addColumn ( 'id' , 'bigserial' , ( col ) => col . notNull ( ) )
10+ . createTable ( 'userevent ' )
11+ . addColumn ( 'id' , 'bigserial' , ( col ) => col . primaryKey ( ) )
1212 . addColumn ( 'usuario_id' , 'integer' , ( col ) => col . notNull ( ) )
13- . addColumn ( 'event_type' , 'varchar(30)' )
13+ . addColumn ( 'event_type' , 'varchar(30)' , ( col ) => col . notNull ( ) )
1414 . addColumn ( 'event_data' , 'jsonb' )
15- . addColumn ( 'created_at' , 'timestamp' )
16- . addColumn ( 'updated_at' , 'timestamp' )
15+ . addColumn ( 'created_at' , 'timestamp' , ( col ) => col . notNull ( ) )
16+ . addColumn ( 'updated_at' , 'timestamp' , ( col ) => col . notNull ( ) )
1717 . execute ( )
1818
1919}
You can’t perform that action at this time.
0 commit comments