Use colour rather than hexcolour in notecolours table

This commit is contained in:
Keith Edmunds 2022-02-06 17:38:07 +00:00
parent 03735c2456
commit 2015dcce1f
6 changed files with 35 additions and 0 deletions

0
app/__init__.py Normal file
View File

View File

@ -0,0 +1,30 @@
"""Update notecolours table
Revision ID: 52cbded98e7c
Revises: c55992d1fe5f
Create Date: 2022-02-06 12:34:30.099417
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '52cbded98e7c'
down_revision = 'c55992d1fe5f'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('notecolours', sa.Column('colour', sa.String(length=21), nullable=True))
op.drop_column('notecolours', 'hexcolour')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('notecolours', sa.Column('hexcolour', mysql.VARCHAR(length=6), nullable=True))
op.drop_column('notecolours', 'colour')
# ### end Alembic commands ###

2
pytest.ini Normal file
View File

@ -0,0 +1,2 @@
[pytest]
addopts = -xls

1
tags.lock Normal file
View File

@ -0,0 +1 @@
3149370

0
tests/__init__.py Normal file
View File

2
tests/test_model.py Normal file
View File

@ -0,0 +1,2 @@
def test_get_colour():
assert False