fixed database migration

This commit is contained in:
alligu 2020-04-23 13:25:09 -04:00
parent e018e8a19a
commit fedf03aec3
2 changed files with 29 additions and 1 deletions

View file

@ -0,0 +1,28 @@
"""added tag column to bill model
Revision ID: 49fc258cebf5
Revises: cb038f79982e
Create Date: 2020-04-23 13:13:08.094805
"""
# revision identifiers, used by Alembic.
revision = '49fc258cebf5'
down_revision = 'cb038f79982e'
from alembic import op
import sqlalchemy as sa
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('bill', sa.Column('tag', sa.UnicodeText(), nullable=True))
op.add_column('bill_version', sa.Column('tag', sa.UnicodeText(), autoincrement=False, nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('bill_version', 'tag')
op.drop_column('bill', 'tag')
# ### end Alembic commands ###

View file

@ -170,7 +170,7 @@
</div>
<div class="form-group">
<button id="btn-bill-filter" type="button" class="btn btn-secondary mr-sm-2">{{ _("Apply Filter") }}</button>
<button id="btn-bill-showall" type="button" class="btn btn-secondary">{{ _("Show All") }}</button>
<button id="btn-bill-showall" type="button" class="btn btn-secondary">{{ _("Clear Filters") }}</button>
</div>
</form>
</div>