sorarebuddy/db/migrations/00006_rename_club_membership.sql

12 lines
414 B
MySQL
Raw Permalink Normal View History

2024-06-06 05:52:54 +00:00
-- +goose Up
ALTER TABLE club_memberships RENAME TO memberships;
ALTER TABLE memberships RENAME COLUMN club_slug TO team_slug;
ALTER TABLE memberships ADD COLUMN membership_type TEXT NOT NULL DEFAULT 'club';
-- +goose Down
ALTER TABLE memberships RENAME TO club_memberships;
ALTER TABLE club_memberships RENAME COLUMN team_slug TO club_slug;
ALTER TABLE club_memberships DROP COLUMN membership_type;