Commit 2fcd7c4c authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

Fix SQLite DB schema upgrade to version 35

SQLite does not support DROP COLUMN and our upgrade language is not
expressive enough to handle that in another way, so for now we just
leave the 'external' column in PartTable on SQLite, it will simply
be ignored. On other backends the column is removed as expected.

BUG: 384024
FIXED-IN: 5.6.1
parent 5e8f6c1d
...@@ -323,7 +323,8 @@ ...@@ -323,7 +323,8 @@
<update version="35" abortOnFailure="true"> <update version="35" abortOnFailure="true">
<raw-sql backends="mysql,sqlite">UPDATE PartTable SET storage = external;</raw-sql> <raw-sql backends="mysql,sqlite">UPDATE PartTable SET storage = external;</raw-sql>
<raw-sql backends="mysql,sqlite">ALTER TABLE PartTable DROP COLUMN external;</raw-sql> <raw-sql backends="mysql">ALTER TABLE PartTable DROP COLUMN external;</raw-sql>
<!-- TODO: SQLITE: drop the column as well, but SQLite does not have DROP COLUMN //-->
<raw-sql backends="psql">UPDATE PartTable SET storage = cast(external as integer);</raw-sql> <raw-sql backends="psql">UPDATE PartTable SET storage = cast(external as integer);</raw-sql>
<raw-sql backends="psql">ALTER TABLE PartTable DROP COLUMN external;</raw-sql> <raw-sql backends="psql">ALTER TABLE PartTable DROP COLUMN external;</raw-sql>
</update> </update>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment