From afe6d5777b478abdca8c5ff82bd0a71718611c8d Mon Sep 17 00:00:00 2001 From: Mark Jacobson <52427991+marksparkza@users.noreply.github.com> Date: Wed, 3 Apr 2024 12:38:44 +0200 Subject: [PATCH] Use existing enum for new column --- migrate/versions/2024_03_26_7102c8734154_archive_integration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrate/versions/2024_03_26_7102c8734154_archive_integration.py b/migrate/versions/2024_03_26_7102c8734154_archive_integration.py index f0af939..997dd2d 100644 --- a/migrate/versions/2024_03_26_7102c8734154_archive_integration.py +++ b/migrate/versions/2024_03_26_7102c8734154_archive_integration.py @@ -31,7 +31,7 @@ def upgrade(): sa.Column('timestamp', sa.TIMESTAMP(timezone=True), nullable=False), sa.Column('provider_id', sa.String(), nullable=False), sa.Column('schema_id', sa.String(), nullable=False), - sa.Column('schema_type', sa.Enum('metadata', 'tag', 'vocabulary', name='schematype'), nullable=False), + sa.Column('schema_type', postgresql.ENUM(name='schematype', create_type=False), nullable=False), sa.CheckConstraint("schema_type = 'metadata'", name='package_schema_type_check'), sa.ForeignKeyConstraint(['provider_id'], ['provider.id'], ondelete='RESTRICT'), sa.ForeignKeyConstraint(['schema_id', 'schema_type'], ['schema.id', 'schema.type'], name='package_schema_fkey',