# HG changeset patch # User Drew DeVault # Date 1730375868 -3600 # Thu Oct 31 12:57:48 2024 +0100 # Node ID d2ed188ddf60b829cde46deb07143eb8deeb2e37 # Parent b04f989b77ee016b7e79a7d0e80c620078088b16 Drop oauth_revocation_token from schema diff --git a/hgsrht/alembic/versions/7b086b645db1_drop_oauth_revocation_token.py b/hgsrht/alembic/versions/7b086b645db1_drop_oauth_revocation_token.py new file mode 100644 --- /dev/null +++ b/hgsrht/alembic/versions/7b086b645db1_drop_oauth_revocation_token.py @@ -0,0 +1,27 @@ +"""Drop oauth_revocation_token + +Revision ID: 7b086b645db1 +Revises: c9e27b24e019 +Create Date: 2024-10-31 12:57:00.425672 + +""" + +# revision identifiers, used by Alembic. +revision = '7b086b645db1' +down_revision = 'c9e27b24e019' + +from alembic import op +import sqlalchemy as sa + + +def upgrade(): + op.execute(""" + ALTER TABLE "user" DROP COLUMN oauth_revocation_token; + """) + + +def downgrade(): + op.execute(""" + ALTER TABLE "user" + ADD COLUMN oauth_revocation_token character varying(256); + """) diff --git a/schema.sql b/schema.sql --- a/schema.sql +++ b/schema.sql @@ -32,8 +32,7 @@ -- TODO: Delete these oauth_token character varying(256), oauth_token_expires timestamp without time zone, - oauth_token_scopes character varying, - oauth_revocation_token character varying(256) + oauth_token_scopes character varying ); CREATE INDEX ix_user_username ON "user" USING btree (username);