forked from galaxyproject/galaxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add prev. version 180 as new revision.
Reason: 180 was added in dev, so it was not in 21.09.
- Loading branch information
Showing
2 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
lib/galaxy/model/migrations/alembic/versions_gxy/40aaada107df_create_table_vault.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
"""create table vault | ||
Revision ID: 40aaada107df | ||
Revises: e7b6dcb09efd | ||
Create Date: 2022-01-19 10:47:47.135278 | ||
""" | ||
import datetime | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '40aaada107df' | ||
down_revision = 'e7b6dcb09efd' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
now = datetime.datetime.utcnow | ||
op.create_table('vault', | ||
sa.Column('key', sa.Text, primary_key=True), | ||
sa.Column('parent_key', sa.Text, sa.ForeignKey('vault.key'), index=True, nullable=True), | ||
sa.Column('value', sa.Text, nullable=True), | ||
sa.Column("create_time", sa.DateTime, default=now), | ||
sa.Column("update_time", sa.DateTime, default=now, onupdate=now), | ||
) | ||
|
||
|
||
def downgrade(): | ||
op.drop_table('vault') |