"""Printer drivers: named SMB/HTTP links to driver packages

Revision ID: 7d13_printerdrivers
Revises: 7d12_drop_isshopfloor
Create Date: 2026-07-09

"""
from alembic import op
import sqlalchemy as sa


revision = '7d13_printerdrivers'
down_revision = '7d12_drop_isshopfloor'
branch_labels = None
depends_on = None


def upgrade():
    op.create_table(
        'printerdrivers',
        sa.Column('driverid', sa.Integer(), primary_key=True),
        sa.Column('name', sa.String(length=150), nullable=False),
        sa.Column('location', sa.String(length=500), nullable=False),
        sa.Column('description', sa.Text(), nullable=True),
        sa.Column('modelnumberid', sa.Integer(), nullable=True),
        sa.Column('isactive', sa.Boolean(), nullable=False, server_default='1'),
        sa.ForeignKeyConstraint(['modelnumberid'], ['models.modelnumberid']),
    )


def downgrade():
    op.drop_table('printerdrivers')
