mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-06 13:01:50 +02:00
fixed database migration
This commit is contained in:
parent
e018e8a19a
commit
fedf03aec3
2 changed files with 29 additions and 1 deletions
|
@ -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 ###
|
|
@ -170,7 +170,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<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-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>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue