12345678910111213141516171819202122232425262728293031 |
- """Add Aardbei fields
- Revision ID: cca57457a0a6
- Revises: 2f3a49058a67
- Create Date: 2019-09-05 21:38:28.489281
- """
- from alembic import op
- import sqlalchemy as sa
- # revision identifiers, used by Alembic.
- revision = "cca57457a0a6"
- down_revision = "2f3a49058a67"
- branch_labels = None
- depends_on = None
- def upgrade():
- with op.batch_alter_table("people") as batch_op:
- batch_op.alter_column("name", new_column_name="full_name")
- batch_op.add_column(sa.Column("aardbei_id", sa.Integer(), nullable=True))
- batch_op.add_column(sa.Column("display_name", sa.String(), nullable=True))
- def downgrade():
- with op.batch_alter_table("people") as batch_op:
- batch_op.alter_column("full_name", new_column_name="name")
- batch_op.drop_column("aardbei_id")
- batch_op.drop_column("display_name")
|