Prepare ERP source for Gitea deployment

This commit is contained in:
A R R R Associates
2026-06-20 15:01:44 +05:30
commit 5c75eb6bd9
450 changed files with 67698 additions and 0 deletions
@@ -0,0 +1,21 @@
from alembic import op
import sqlalchemy as sa
revision = "20260419_client_portal_user_link"
down_revision = "20260416_release_b6_cleanup"
branch_labels = None
depends_on = None
def upgrade():
with op.batch_alter_table("clients") as batch_op:
batch_op.add_column(sa.Column("portal_user_id", sa.Integer(), nullable=True))
batch_op.create_index("ix_clients_portal_user_id", ["portal_user_id"], unique=False)
batch_op.create_foreign_key("fk_clients_portal_user_id_users", "users", ["portal_user_id"], ["id"])
def downgrade():
with op.batch_alter_table("clients") as batch_op:
batch_op.drop_constraint("fk_clients_portal_user_id_users", type_="foreignkey")
batch_op.drop_index("ix_clients_portal_user_id")
batch_op.drop_column("portal_user_id")