From 04c5410c4119747818acea2d97607a2c45021def Mon Sep 17 00:00:00 2001 From: Raphael Maenle Date: Sat, 25 Jul 2020 11:41:12 +0200 Subject: [PATCH] migration scripts to newest database --- .../versions/{121eab3835ee_.py => 9882522aafa9_.py} | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) rename database/migrations/versions/{121eab3835ee_.py => 9882522aafa9_.py} (51%) diff --git a/database/migrations/versions/121eab3835ee_.py b/database/migrations/versions/9882522aafa9_.py similarity index 51% rename from database/migrations/versions/121eab3835ee_.py rename to database/migrations/versions/9882522aafa9_.py index 84d5414..9daae5c 100644 --- a/database/migrations/versions/121eab3835ee_.py +++ b/database/migrations/versions/9882522aafa9_.py @@ -1,8 +1,8 @@ """empty message -Revision ID: 121eab3835ee +Revision ID: 9882522aafa9 Revises: e5ef5e4a807b -Create Date: 2020-07-17 08:03:36.947158 +Create Date: 2020-07-25 09:34:07.987380 """ from alembic import op @@ -10,7 +10,7 @@ import sqlalchemy as sa # revision identifiers, used by Alembic. -revision = '121eab3835ee' +revision = '9882522aafa9' down_revision = 'e5ef5e4a807b' branch_labels = None depends_on = None @@ -18,11 +18,13 @@ depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### - op.add_column('device', sa.Column('lastConnection', sa.BigInteger(), nullable=True)) + op.add_column('calendar', sa.Column('calendar_type', sa.String(length=32), nullable=True)) + op.create_index(op.f('ix_calendar_calendar_type'), 'calendar', ['calendar_type'], unique=False) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### - op.drop_column('device', 'lastConnection') + op.drop_index(op.f('ix_calendar_calendar_type'), table_name='calendar') + op.drop_column('calendar', 'calendar_type') # ### end Alembic commands ###