From 74f17def71df75340afe695d01c19440ca61d478 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 9 Aug 2022 11:38:30 +0200 Subject: [PATCH] add components to placeholder migration --- .../versions/2b90b41a556a_add_owner_to_placeholder.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ereuse_devicehub/migrations/versions/2b90b41a556a_add_owner_to_placeholder.py b/ereuse_devicehub/migrations/versions/2b90b41a556a_add_owner_to_placeholder.py index c8a80e5a..20ef7319 100644 --- a/ereuse_devicehub/migrations/versions/2b90b41a556a_add_owner_to_placeholder.py +++ b/ereuse_devicehub/migrations/versions/2b90b41a556a_add_owner_to_placeholder.py @@ -5,6 +5,7 @@ Revises: 2b90b41a556a Create Date: 2022-07-27 14:40:15.513820 """ +import citext import sqlalchemy as sa from alembic import context, op from sqlalchemy.dialects import postgresql @@ -41,6 +42,11 @@ def upgrade(): sa.Column('is_abstract', sa.Boolean(), nullable=True), schema=f'{get_inv()}', ) + op.add_column( + 'placeholder', + sa.Column('components', citext.CIText(), nullable=True), + schema=f'{get_inv()}', + ) op.add_column( 'placeholder', sa.Column('owner_id', postgresql.UUID(), nullable=True), @@ -69,3 +75,4 @@ def downgrade(): ) op.drop_column('placeholder', 'owner_id', schema=f'{get_inv()}') op.drop_column('placeholder', 'is_abstract', schema=f'{get_inv()}') + op.drop_column('placeholder', 'components', schema=f'{get_inv()}')