diff --git a/webapp/alembic/versions/dffebf852b41_updated_primary_keys_away_from_the_auto_.py b/webapp/alembic/versions/dffebf852b41_updated_primary_keys_away_from_the_auto_.py index c096532..0ca2d23 100644 --- a/webapp/alembic/versions/dffebf852b41_updated_primary_keys_away_from_the_auto_.py +++ b/webapp/alembic/versions/dffebf852b41_updated_primary_keys_away_from_the_auto_.py @@ -25,9 +25,11 @@ def upgrade(): op.execute("ALTER TABLE authenticated_users ALTER COLUMN client_id TYPE BIGINT USING client_id::bigint") op.execute("ALTER TABLE authenticated_users ALTER COLUMN guild_id DROP DEFAULT") op.execute("ALTER TABLE authenticated_users ALTER COLUMN guild_id TYPE BIGINT USING guild_id::bigint") + op.execute("ALTER TABLE cosmetics ALTER COLUMN user_id DROP DEFAULT") op.execute("ALTER TABLE cosmetics ALTER COLUMN user_id TYPE BIGINT USING user_id::bigint") op.drop_column('cosmetics', 'id') op.execute("ALTER TABLE cosmetics ADD PRIMARY KEY (user_id);") + op.execute("ALTER TABLE disabled_guilds ALTER COLUMN guild_id DROP DEFAULT") op.execute("ALTER TABLE disabled_guilds ALTER COLUMN guild_id TYPE BIGINT USING guild_id::bigint") op.drop_column('disabled_guilds', 'id') op.execute("ALTER TABLE disabled_guilds ADD PRIMARY KEY (guild_id);") @@ -49,20 +51,25 @@ def upgrade(): op.execute("ALTER TABLE messages ALTER COLUMN message_id TYPE BIGINT USING message_id::bigint") op.drop_column('messages', 'id') op.execute("ALTER TABLE messages ADD PRIMARY KEY (message_id);") + op.execute("ALTER TABLE patreon ALTER COLUMN user_id DROP DEFAULT") op.execute("ALTER TABLE patreon ALTER COLUMN user_id TYPE BIGINT USING user_id::bigint") op.drop_column('patreon', 'id') op.execute("ALTER TABLE patreon ADD PRIMARY KEY (user_id);") + op.execute("ALTER TABLE titan_tokens ALTER COLUMN user_id DROP DEFAULT") op.execute("ALTER TABLE titan_tokens ALTER COLUMN user_id TYPE BIGINT USING user_id::bigint") op.drop_column('titan_tokens', 'id') op.execute("ALTER TABLE titan_tokens ADD PRIMARY KEY (user_id);") + op.execute("ALTER TABLE token_transactions ALTER COLUMN user_id DROP DEFAULT") op.execute("ALTER TABLE token_transactions ALTER COLUMN user_id TYPE BIGINT USING user_id::bigint") op.execute("ALTER TABLE unauthenticated_bans ALTER COLUMN guild_id DROP DEFAULT") op.execute("ALTER TABLE unauthenticated_bans ALTER COLUMN guild_id TYPE BIGINT USING guild_id::bigint") + op.execute("ALTER TABLE unauthenticated_bans ALTER COLUMN lifter_id DROP DEFAULT") op.execute("ALTER TABLE unauthenticated_bans ALTER COLUMN lifter_id TYPE BIGINT USING lifter_id::bigint") op.execute("ALTER TABLE unauthenticated_bans ALTER COLUMN placer_id DROP DEFAULT") op.execute("ALTER TABLE unauthenticated_bans ALTER COLUMN placer_id TYPE BIGINT USING placer_id::bigint") op.execute("ALTER TABLE unauthenticated_users ALTER COLUMN guild_id DROP DEFAULT") op.execute("ALTER TABLE unauthenticated_users ALTER COLUMN guild_id TYPE BIGINT USING guild_id::bigint") + op.execute("ALTER TABLE user_css ALTER COLUMN user_id DROP DEFAULT") op.execute("ALTER TABLE user_css ALTER COLUMN user_id TYPE BIGINT USING user_id::bigint") # ### end Alembic commands ###