Browse Source
Combine into one alembic migration
merge-requests/3/head
Ivan Fonseca
8 years ago
No known key found for this signature in database
GPG Key ID: 95A9C856EC788689
3 changed files with
26 additions and
50 deletions
-
tildes/alembic/versions/2512581c91b3_add_setting_to_open_links_in_new_tab.py
-
tildes/alembic/versions/89d583f29f29_setting_for_opening_internal_external_.py
-
tildes/alembic/versions/becc33b73339_add_setting_to_open_links_in_new_tabs.py
|
|
|
@ -0,0 +1,26 @@ |
|
|
|
"""Add setting to open links in new tab |
|
|
|
|
|
|
|
Revision ID: 2512581c91b3 |
|
|
|
Revises: |
|
|
|
Create Date: 2018-07-21 22:23:49.563318 |
|
|
|
|
|
|
|
""" |
|
|
|
from alembic import op |
|
|
|
import sqlalchemy as sa |
|
|
|
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic. |
|
|
|
revision = '2512581c91b3' |
|
|
|
down_revision = None |
|
|
|
branch_labels = None |
|
|
|
depends_on = None |
|
|
|
|
|
|
|
|
|
|
|
def upgrade(): |
|
|
|
op.add_column('users', sa.Column('open_new_tab_external', sa.Boolean(), server_default='false', nullable=False)) |
|
|
|
op.add_column('users', sa.Column('open_new_tab_internal', sa.Boolean(), server_default='false', nullable=False)) |
|
|
|
|
|
|
|
|
|
|
|
def downgrade(): |
|
|
|
op.drop_column('users', 'open_new_tab_internal') |
|
|
|
op.drop_column('users', 'open_new_tab_external') |
|
|
|
@ -1,26 +0,0 @@ |
|
|
|
"""Setting for opening internal & external links in new tabs |
|
|
|
|
|
|
|
Revision ID: 89d583f29f29 |
|
|
|
Revises: becc33b73339 |
|
|
|
Create Date: 2018-07-20 23:27:00.751921 |
|
|
|
|
|
|
|
""" |
|
|
|
from alembic import op |
|
|
|
import sqlalchemy as sa |
|
|
|
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic. |
|
|
|
revision = '89d583f29f29' |
|
|
|
down_revision = 'becc33b73339' |
|
|
|
branch_labels = None |
|
|
|
depends_on = None |
|
|
|
|
|
|
|
|
|
|
|
def upgrade(): |
|
|
|
op.alter_column('users', 'open_links_new_tab', new_column_name='open_new_tab_external') |
|
|
|
op.add_column('users', sa.Column('open_new_tab_internal', sa.Boolean(), server_default='false', nullable=False)) |
|
|
|
|
|
|
|
|
|
|
|
def downgrade(): |
|
|
|
op.alter_column('users', 'open_new_tab_external', new_column_name='open_links_new_tab') |
|
|
|
op.drop_column('users', 'open_new_tab_internal') |
|
|
|
@ -1,24 +0,0 @@ |
|
|
|
"""Add setting to open links in new tabs |
|
|
|
|
|
|
|
Revision ID: becc33b73339 |
|
|
|
Revises: |
|
|
|
Create Date: 2018-07-19 02:56:06.160422 |
|
|
|
|
|
|
|
""" |
|
|
|
from alembic import op |
|
|
|
import sqlalchemy as sa |
|
|
|
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic. |
|
|
|
revision = 'becc33b73339' |
|
|
|
down_revision = None |
|
|
|
branch_labels = None |
|
|
|
depends_on = None |
|
|
|
|
|
|
|
|
|
|
|
def upgrade(): |
|
|
|
op.add_column('users', sa.Column('open_links_new_tab', sa.Boolean(), server_default='false', nullable=False)) |
|
|
|
|
|
|
|
|
|
|
|
def downgrade(): |
|
|
|
op.drop_column('users', 'open_links_new_tab') |