Skip to content

Commit

Permalink
Alter!
Browse files Browse the repository at this point in the history
  • Loading branch information
NotChristianGarcia committed Sep 14, 2024
1 parent 3e34683 commit 20c0288
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions alembic/versions/6333debf3f60_init8.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,10 @@ def upgrade_alltenants():
)
op.add_column('pod', sa.Column('arguments', postgresql.ARRAY(sa.String()), nullable=True))
op.add_column('pod', sa.Column('modified_fields', postgresql.ARRAY(sa.String(), dimensions=1), nullable=True))
op.add_column('pod', sa.Column('image', sqlmodel.sql.sqltypes.AutoString(), nullable=True, server_default=sa.String('')))
op.add_column('pod', sa.Column('template', sqlmodel.sql.sqltypes.AutoString(), nullable=True, server_default=sa.String('')))
op.add_column('pod', sa.Column('compute_queue', sqlmodel.sql.sqltypes.AutoString(), nullable=True, server_default=sa.String('')))
op.add_column('pod', sa.Column('template', sqlmodel.sql.sqltypes.AutoString(), nullable=True, server_default=''))
op.add_column('pod', sa.Column('compute_queue', sqlmodel.sql.sqltypes.AutoString(), nullable=True, server_default=''))
op.alter_column('pod', 'pod_template', new_column_name='image', existing_type=sqlmodel.sql.sqltypes.AutoString(), nullable=True, server_default='')
op.drop_column('pod', 'data_attached')
op.drop_column('pod', 'pod_template')
op.drop_column('pod', 'roles_inherited')
op.drop_column('pod', 'roles_required')
op.drop_column('pod', 'data_requests')
Expand All @@ -75,11 +74,10 @@ def downgrade_alltenants():
op.add_column('pod', sa.Column('data_requests', postgresql.ARRAY(sa.VARCHAR()), autoincrement=False, nullable=True))
op.add_column('pod', sa.Column('roles_required', postgresql.ARRAY(sa.VARCHAR()), autoincrement=False, nullable=True))
op.add_column('pod', sa.Column('roles_inherited', postgresql.ARRAY(sa.VARCHAR()), autoincrement=False, nullable=True))
op.add_column('pod', sa.Column('pod_template', sa.VARCHAR(), autoincrement=False, nullable=False, server_default=""))
op.add_column('pod', sa.Column('data_attached', postgresql.ARRAY(sa.VARCHAR()), autoincrement=False, nullable=True))
op.alter_column('pod', 'image', new_column_name='pod_template', existing_type=sqlmodel.sql.sqltypes.AutoString(), nullable=False, server_default="")
op.drop_column('pod', 'compute_queue')
op.drop_column('pod', 'template')
op.drop_column('pod', 'image')
op.drop_column('pod', 'modified_fields')
op.drop_column('pod', 'arguments')
op.drop_table('templatetag')
Expand Down

0 comments on commit 20c0288

Please sign in to comment.