Skip to content
Snippets Groups Projects
Commit 6f960127 authored by Neda Moeini's avatar Neda Moeini Committed by Mohammad Torkashvand
Browse files

Add the GA_ID and GS_ID sequence to manage automatic creation of GA and GS ids

parent f064efed
No related branches found
No related tags found
1 merge request!324Feature/manage sid and gids
"""Add GS and GA sequences.
Revision ID: 79192e72131c
Revises: e36b3bd8a45c
Create Date: 2024-12-05 11:11:41.048264
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '79192e72131c'
down_revision = 'e36b3bd8a45c'
branch_labels = None
depends_on = None
def upgrade() -> None:
# Create GS ID sequence
op.execute("""
CREATE SEQUENCE gs_id_seq
START WITH 50000
INCREMENT BY 1
MINVALUE 50000
MAXVALUE 99999
NO CYCLE;
""")
# Create GA ID sequence
op.execute("""
CREATE SEQUENCE ga_id_seq
START WITH 50000
INCREMENT BY 1
MINVALUE 50000
MAXVALUE 99999
NO CYCLE;
""")
def downgrade() -> None:
op.execute("DROP SEQUENCE gs_id_seq")
op.execute("DROP SEQUENCE ga_id_seq")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment