diff options
Diffstat (limited to 'zuul/driver/sql/alembic/versions')
-rw-r--r-- | zuul/driver/sql/alembic/versions/cfc0dc45f341_change_patchset_to_string.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/zuul/driver/sql/alembic/versions/cfc0dc45f341_change_patchset_to_string.py b/zuul/driver/sql/alembic/versions/cfc0dc45f341_change_patchset_to_string.py index 3fde8e545..e8226837b 100644 --- a/zuul/driver/sql/alembic/versions/cfc0dc45f341_change_patchset_to_string.py +++ b/zuul/driver/sql/alembic/versions/cfc0dc45f341_change_patchset_to_string.py @@ -17,11 +17,19 @@ import sqlalchemy as sa BUILDSET_TABLE = 'zuul_buildset' +# Note: the following migration does not do what it was intended to do +# (change the column type to a string). It was introduced with an +# error which instead caused the nullable flag to be set to true (even +# though it was already set), effectively making it a no-op. To +# maintain compatibility with later versions of alembic, this has been +# updated to explicitly do now what it implicitly did then. A later +# migration (19d3a3ebfe1d) corrects the error and changes the type. + def upgrade(table_prefix=''): op.alter_column(table_prefix + BUILDSET_TABLE, 'patchset', - sa.String(255), + nullable=True, existing_nullable=True, existing_type=sa.Integer) |