Added support for color_hex alpha channel

This commit is contained in:
Donkie
2023-08-12 21:32:20 +02:00
parent 6934748b14
commit 4cb2542a41
6 changed files with 69 additions and 8 deletions

View File

@@ -2,6 +2,6 @@
Creating a new version:
```bash
python -m spoolman.main
pdm run python -m spoolman.main
pdm run alembic revision -m "some title" --autogenerate
```

View File

@@ -0,0 +1,24 @@
"""color_hex alpha.
Revision ID: 92793c8a937c
Revises: 92186a5f7b0f
Create Date: 2023-08-12 21:21:08.536216
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "92793c8a937c"
down_revision = "92186a5f7b0f"
branch_labels = None
depends_on = None
def upgrade() -> None:
"""Perform the upgrade."""
op.alter_column("filament", "color_hex", type_=sa.String(length=8), existing_nullable=True)
def downgrade() -> None:
"""Perform the downgrade."""
op.alter_column("filament", "color_hex", type_=sa.String(length=6), existing_nullable=True)