Digitale bierlijst

a09086bfe84c_create_persons_table.py 588B

123456789101112131415161718192021222324252627282930
  1. """Create persons table
  2. Revision ID: a09086bfe84c
  3. Revises:
  4. Create Date: 2018-08-19 21:03:55.857085
  5. """
  6. from alembic import op
  7. import sqlalchemy as sa
  8. # revision identifiers, used by Alembic.
  9. revision = "a09086bfe84c"
  10. down_revision = None
  11. branch_labels = None
  12. depends_on = None
  13. def upgrade():
  14. op.create_table(
  15. "people",
  16. sa.Column("person_id", sa.Integer, primary_key=True),
  17. sa.Column("name", sa.String, nullable=False),
  18. sa.Column("active", sa.Boolean, server_default="FALSE", nullable=False),
  19. )
  20. def downgrade():
  21. op.drop_table("people")