mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-04-28 17:32:38 +02:00
Added migration rule and set default bill_type in alembic
This commit is contained in:
parent
33b8cafb3e
commit
b602134772
1 changed files with 3 additions and 2 deletions
|
@ -16,9 +16,10 @@ from ihatemoney.models import BillType
|
|||
|
||||
|
||||
def upgrade():
|
||||
op.add_column("bill", sa.Column("bill_type", sa.Enum(BillType)))
|
||||
op.add_column("bill", sa.Column("bill_type", sa.Enum(BillType), server_default=BillType.EXPENSE.value))
|
||||
op.add_column("bill_version", sa.Column("bill_type", sa.UnicodeText()))
|
||||
|
||||
|
||||
def downgrade():
|
||||
pass
|
||||
op.drop_column("bill", "bill_type")
|
||||
op.drop_column("bill_version", "bill_type")
|
||||
|
|
Loading…
Reference in a new issue