Skip to content

Commit

Permalink
feat: cocktail_id of user
Browse files Browse the repository at this point in the history
  • Loading branch information
xappyyy committed Dec 23, 2023
1 parent fc8e450 commit 8ab54c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/domain/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ type User struct {
UserID string `gorm:"primaryKey"`
UserName string
IsUserCompleted bool
CocktailID uint
Checkins []Checkin `gorm:"foreignKey:UserID;references:UserID"`
}

Expand Down
7 changes: 7 additions & 0 deletions supabase/migrations/20231223083520_cocktail_id.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
alter table "public"."users" add column "cocktail_id" bigint;

alter table "public"."users" add constraint "users_cocktail_id_check" CHECK ((cocktail_id >= 0)) not valid;

alter table "public"."users" validate constraint "users_cocktail_id_check";


0 comments on commit 8ab54c1

Please sign in to comment.