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
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
Commits
6f960127
Commit
6f960127
authored
3 months ago
by
Neda Moeini
Committed by
Mohammad Torkashvand
3 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Add the GA_ID and GS_ID sequence to manage automatic creation of GA and GS ids
parent
f064efed
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!324
Feature/manage sid and gids
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gso/migrations/versions/2024-12-05_79192e72131c_add_gs_and_ga_sequences.py
+42
-0
42 additions, 0 deletions
...rsions/2024-12-05_79192e72131c_add_gs_and_ga_sequences.py
with
42 additions
and
0 deletions
gso/migrations/versions/2024-12-05_79192e72131c_add_gs_and_ga_sequences.py
0 → 100644
+
42
−
0
View file @
6f960127
"""
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
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment