package logins import ( "gorm.io/driver/postgres" "gorm.io/gorm" ) type Users struct { Username string `gorm:"primaryKey"` Email string `gorm:"unique:users_email_key"` Password string `gorm:""` } func Init_database() { dsn := "postgres://acc:totor@postgres:5432/accounts?sslmode=disable" db, err := gorm.Open(postgres.Open(dsn), &gorm.Config{}) if err != nil { } db.AutoMigrate(&Users{}) }