Merge pull request 'fix: missing package and migration issue' (#10) from furqan into dev
Reviewed-on: https://gitea.maskantech.in/gitea_admin/saas_backend/pulls/10
This commit is contained in:
@@ -113,8 +113,19 @@ def upgrade() -> None:
|
||||
op.create_index(op.f('ix_accesses_module_id'), 'accesses', ['module_id'], unique=False)
|
||||
op.create_index(op.f('ix_accesses_scope'), 'accesses', ['scope'], unique=False)
|
||||
op.create_foreign_key(None, 'accesses', 'modules', ['module_id'], ['id'])
|
||||
op.drop_constraint(op.f('users_palette_id_fkey'), 'users', type_='foreignkey')
|
||||
op.drop_column('users', 'palette_id')
|
||||
# Inspect to see if constraint/column exists to avoid transaction abortion on failure
|
||||
bind = op.get_bind()
|
||||
inspector = sa.inspect(bind)
|
||||
|
||||
# Check and drop foreign key
|
||||
fks = inspector.get_foreign_keys('users')
|
||||
if any(fk['name'] == 'users_palette_id_fkey' for fk in fks):
|
||||
op.drop_constraint('users_palette_id_fkey', 'users', type_='foreignkey')
|
||||
|
||||
# Check and drop column
|
||||
columns = [c['name'] for c in inspector.get_columns('users')]
|
||||
if 'palette_id' in columns:
|
||||
op.drop_column('users', 'palette_id')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
|
||||
+2
-1
@@ -8,4 +8,5 @@ pydantic-settings==2.12.0
|
||||
bcrypt>=4.0.1
|
||||
pyjwt>=2.8.0
|
||||
email-validator>=2.1.0
|
||||
redis==7.1.0
|
||||
redis==7.1.0
|
||||
requests==2.32.5
|
||||
Reference in New Issue
Block a user