Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Polyakov committed Jun 19, 2024
1 parent 5b08643 commit a707135
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ remove-db:

# Attach to the running PostgreSQL container
attach-db:
docker exec -it ctf01d-postgres psql -U postgres
docker exec -it ctf01d-postgres psql -U postgres -d ctf01d_training_platform

# Generate Go server boilerplate from OpenAPI 3
codegen:
Expand Down
15 changes: 15 additions & 0 deletions internal/app/database/update0013_update0014.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,21 @@ func DatabaseUpdate_update0013_update0014(db *sql.DB, getInfo bool) (string, str
ALTER TABLE game_services RENAME COLUMN new_service_id TO service_id;
ALTER TABLE sessions DROP CONSTRAINT sessions_user_id_fkey;
ALTER TABLE sessions DROP COLUMN id;
ALTER TABLE sessions RENAME COLUMN new_id TO id;
ALTER TABLE teams DROP CONSTRAINT teams_user_id_fkey;
ALTER TABLE teams DROP COLUMN id;
ALTER TABLE teams RENAME COLUMN new_id TO id;
ALTER TABLE games DROP CONSTRAINT games_user_id_fkey;
ALTER TABLE games DROP COLUMN id;
ALTER TABLE games RENAME COLUMN new_id TO id;
COMMIT;
`
_, err := db.Exec(query)
Expand Down

0 comments on commit a707135

Please sign in to comment.