From 1f6e225a1b01e8eb4cd9f1d5da05455d85326064 Mon Sep 17 00:00:00 2001 From: Pea Tyczynska Date: Thu, 13 May 2021 14:20:01 +0100 Subject: [PATCH] Validate ck_user_has_mobile_or_other_auth constraint This is second step out of two step migration. We divided it like this to avoid potentially locking production database for extended amounts of time. --- .../versions/0357_validate_constraint.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 migrations/versions/0357_validate_constraint.py diff --git a/migrations/versions/0357_validate_constraint.py b/migrations/versions/0357_validate_constraint.py new file mode 100644 index 000000000..270e5f60d --- /dev/null +++ b/migrations/versions/0357_validate_constraint.py @@ -0,0 +1,23 @@ +""" + +Revision ID: 0357_validate_constraint +Revises: 0356_add_webautn_auth_type +Create Date: 2021-05-13 14:15:25.259991 + +""" +from alembic import op + +revision = '0357_validate_constraint' +down_revision = '0356_add_webautn_auth_type' + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.execute('ALTER TABLE users VALIDATE CONSTRAINT "ck_user_has_mobile_or_other_auth"') + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ###