mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-06 13:01:50 +02:00
Crete a migration file for Project.default_currency
This commit is contained in:
parent
c207657288
commit
a83ebe3d7b
2 changed files with 23 additions and 1 deletions
|
@ -0,0 +1,22 @@
|
||||||
|
"""add project.default_currency field
|
||||||
|
|
||||||
|
Revision ID: 5cdb4f2e52c9
|
||||||
|
Revises: e782dd493cdc
|
||||||
|
Create Date: 2019-12-06 15:46:03.416256
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '5cdb4f2e52c9'
|
||||||
|
down_revision = 'e782dd493cdc'
|
||||||
|
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
op.add_column("project", sa.Column("default_currency", sa.String(length=3), nullable=True))
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
op.drop_column("project", "default_currency")
|
|
@ -1,4 +1,4 @@
|
||||||
"""add original currency and original amount fields to Bill
|
"""add bill.original_currency and bill.original_amount fields
|
||||||
|
|
||||||
Revision ID: e782dd493cdc
|
Revision ID: e782dd493cdc
|
||||||
Revises: 6c6fb2b7f229
|
Revises: 6c6fb2b7f229
|
||||||
|
|
Loading…
Reference in a new issue