From 1a9a7425b9333d4ed1df7dca772788525408d10d Mon Sep 17 00:00:00 2001 From: Luke Van Seters Date: Fri, 23 Jul 2021 17:04:49 -0400 Subject: [PATCH] Drop enums on downgrade and remove contract address field --- alembic/versions/0660432b9840_create_classifications_table.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/alembic/versions/0660432b9840_create_classifications_table.py b/alembic/versions/0660432b9840_create_classifications_table.py index bc4da99..00200a0 100644 --- a/alembic/versions/0660432b9840_create_classifications_table.py +++ b/alembic/versions/0660432b9840_create_classifications_table.py @@ -47,7 +47,6 @@ def upgrade(): "trace_type", sa.Enum(*TRACE_TYPES, name="trace_type"), nullable=False ), sa.Column("trace_address", sa.String(256), nullable=False), - sa.Column("contract_address", sa.String(256), nullable=True), sa.Column("protocol", sa.Enum(*PROTOCOL_TYPES, name="protocol"), nullable=True), sa.Column("function_name", sa.String(2048), nullable=True), sa.Column("function_signature", sa.String(2048), nullable=True), @@ -61,3 +60,6 @@ def upgrade(): def downgrade(): op.drop_table("classifications") + sa.Enum(name="trace_type").drop(op.get_bind(), checkfirst=False) + sa.Enum(name="classification_type").drop(op.get_bind(), checkfirst=False) + sa.Enum(name="protocol").drop(op.get_bind(), checkfirst=False)