From 2015dcce1f4714dec615aa55ce25af91ab15e2a1 Mon Sep 17 00:00:00 2001 From: Keith Edmunds Date: Sun, 6 Feb 2022 17:38:07 +0000 Subject: [PATCH] Use colour rather than hexcolour in notecolours table --- app/__init__.py | 0 .../52cbded98e7c_update_notecolours_table.py | 30 +++++++++++++++++++ pytest.ini | 2 ++ tags.lock | 1 + tests/__init__.py | 0 tests/test_model.py | 2 ++ 6 files changed, 35 insertions(+) create mode 100644 app/__init__.py create mode 100644 migrations/versions/52cbded98e7c_update_notecolours_table.py create mode 100644 pytest.ini create mode 100644 tags.lock create mode 100644 tests/__init__.py create mode 100644 tests/test_model.py diff --git a/app/__init__.py b/app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/migrations/versions/52cbded98e7c_update_notecolours_table.py b/migrations/versions/52cbded98e7c_update_notecolours_table.py new file mode 100644 index 0000000..b7a4e64 --- /dev/null +++ b/migrations/versions/52cbded98e7c_update_notecolours_table.py @@ -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 ### diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..1ae6aed --- /dev/null +++ b/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +addopts = -xls diff --git a/tags.lock b/tags.lock new file mode 100644 index 0000000..bdefaba --- /dev/null +++ b/tags.lock @@ -0,0 +1 @@ +3149370 diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_model.py b/tests/test_model.py new file mode 100644 index 0000000..49c2587 --- /dev/null +++ b/tests/test_model.py @@ -0,0 +1,2 @@ +def test_get_colour(): + assert False