I am using GRDB
for local persistence.
Created a column in the Item
table with the following constraints.
table.column(Item.CodingKeys.text.rawValue, .text).notNull()
Now I want to change it to support optional values as well.
table.column(Item.CodingKeys.text.rawValue, .text)
But in order to migrate, I cant alter its property. Only add, rename
available for the column.
What approach should I take to properly migrate while keeping backward compatibility?
ALTER COLUMN
is not possible in SQLite
.
Only Supported alter operations:
Reference: