Skip to content

Commit fcdfcbb

Browse files
authored
Merge pull request #1887 from RCOSDP/feature/issue61752_alembic
Feature/issue61752 alembic
2 parents 975737f + 8c6e47c commit fcdfcbb

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#
2+
# This file is part of Invenio.
3+
# Copyright (C) 2016-2018 CERN.
4+
#
5+
# Invenio is free software; you can redistribute it and/or modify it
6+
# under the terms of the MIT License; see LICENSE file for more details.
7+
8+
"""add column file readonly_keys"""
9+
10+
from alembic import op
11+
import sqlalchemy as sa
12+
13+
14+
# revision identifiers, used by Alembic.
15+
revision = 'faf4faa08601'
16+
down_revision = '8644b32a3eec'
17+
branch_labels = ()
18+
depends_on = None
19+
20+
21+
def upgrade():
22+
"""Upgrade database."""
23+
op.add_column('files_location', sa.Column('readonly_access_key', sa.String(length=128), nullable=True))
24+
op.add_column('files_location', sa.Column('readonly_secret_key', sa.String(length=128), nullable=True))
25+
26+
27+
def downgrade():
28+
"""Downgrade database."""
29+
op.drop_column('files_location', 'readonly_secret_key')
30+
op.drop_column('files_location', 'readonly_access_key')

0 commit comments

Comments
 (0)