"""Added createdDate to BranchIndex

Peek Plugin Database Migration Script

Revision ID: 361988cd327d
Revises: 8ef78f862ac8
Create Date: 2019-05-07 22:14:27.012735

"""

# revision identifiers, used by Alembic.
revision = "361988cd327d"
down_revision = "8ef78f862ac8"
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa
import geoalchemy2


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "BranchIndex",
        sa.Column("createdDate", sa.DateTime(timezone=True), nullable=False),
        schema="pl_diagram",
    )
    op.add_column(
        "BranchIndex",
        sa.Column("updatedDate", sa.DateTime(timezone=True), nullable=True),
        schema="pl_diagram",
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("BranchIndex", "updatedDate", schema="pl_diagram")
    op.drop_column("BranchIndex", "createdDate", schema="pl_diagram")
    # ### end Alembic commands ###
