Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Merge requests
!324
Feature/manage sid and gids
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Feature/manage sid and gids
feature/manage-sid-and-gids
into
develop
Overview
1
Commits
20
Pipelines
7
Changes
1
All threads resolved!
Hide all comments
Merged
Neda Moeini
requested to merge
feature/manage-sid-and-gids
into
develop
6 months ago
Overview
1
Commits
20
Pipelines
7
Changes
1
All threads resolved!
Hide all comments
Expand
0
0
Merge request reports
Viewing commit
7dc3a0e9
Show latest version
1 file
+
42
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
7dc3a0e9
Add the GA_ID and GS_ID sequence to manage automatic creation of GA and GS ids
· 7dc3a0e9
Neda Moeini
authored
6 months ago
gso/migrations/versions/2024-12-05_79192e72131c_add_gs_and_ga_sequences.py
0 → 100644
+
42
−
0
Options
"""
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
"
)
Loading