From 2fb8e8ca9ade2191c6eb2974f088e01240d1a3f2 Mon Sep 17 00:00:00 2001 From: divyam234 Date: Fri, 18 Aug 2023 04:55:27 +0530 Subject: [PATCH] fix data type --- database/migrations/20230817172325_tables.sql | 2 +- models/user.model.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/database/migrations/20230817172325_tables.sql b/database/migrations/20230817172325_tables.sql index d38a323..f392d35 100644 --- a/database/migrations/20230817172325_tables.sql +++ b/database/migrations/20230817172325_tables.sql @@ -35,7 +35,7 @@ now()) ); create table teldrive.users ( - user_id int4 not null primary key, + user_id bigint not null primary key, name text null, user_name text null, is_premium bool not null, diff --git a/models/user.model.go b/models/user.model.go index 7e26475..d39a97d 100644 --- a/models/user.model.go +++ b/models/user.model.go @@ -5,7 +5,7 @@ import ( ) type User struct { - UserId int `gorm:"type:int;primaryKey"` + UserId int `gorm:"type:bigint;primaryKey"` Name string `gorm:"type:text"` UserName string `gorm:"type:text"` IsPremium bool `gorm:"type:bool"`