"""add offline cache enable

Peek Plugin Database Migration Script

Revision ID: 4b0d6309e556
Revises: 2561b7732a6c
Create Date: 2022-01-19 00:35:19.510263

"""

# revision identifiers, used by Alembic.
revision = "4b0d6309e556"
down_revision = "2561b7732a6c"
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "DeviceInfo",
        sa.Column(
            "isOfflineCacheEnabled",
            sa.Boolean(),
            server_default="0",
            nullable=False,
        ),
        schema="core_device",
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("DeviceInfo", "isOfflineCacheEnabled", schema="core_device")
    # ### end Alembic commands ###
