From 71e0824c8477db133ccf2d5b0a4b4258a4c0d6c6 Mon Sep 17 00:00:00 2001 From: coolneng Date: Wed, 10 Feb 2021 01:03:52 +0100 Subject: [PATCH] Remove test users from database --- .../c93f3cf71005_remove_test_users.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 migrations/versions/c93f3cf71005_remove_test_users.py diff --git a/migrations/versions/c93f3cf71005_remove_test_users.py b/migrations/versions/c93f3cf71005_remove_test_users.py new file mode 100644 index 0000000..0d3db31 --- /dev/null +++ b/migrations/versions/c93f3cf71005_remove_test_users.py @@ -0,0 +1,24 @@ +"""remove test users + +Revision ID: c93f3cf71005 +Revises: e443e876bf33 +Create Date: 2021-02-10 00:41:48.290699 + +""" +import sqlalchemy as sa +from alembic import op + +# revision identifiers, used by Alembic. +revision = "c93f3cf71005" +down_revision = "e443e876bf33" +branch_labels = None +depends_on = None + + +def upgrade(): + query = "DELETE FROM users WHERE email LIKE '%techugo%'" + op.execute(query) + + +def downgrade(): + pass