silverstripe / silverstripe-sqlite3

SQLite3 DB Adapter for Silverstripe
BSD 3-Clause "New" or "Revised" License
8 stars 19 forks source link

Legacy enum values not rewritten to default #54

Open maxime-rainville opened 5 years ago

maxime-rainville commented 5 years ago

Let's say you have enum field that accepts values one, two and three with two as the default. If you later remove one from the list of allowed values and rebuild your database, all instances of one should be rewritten to the default two.

At least that's how DBSchemaManager::requiredField() is written.

However because the SQLite enum format is different, there's a regex that falls on its face and the invalidated values don't get updated. DBEnumTest will fail on SQLite once https://github.com/silverstripe/silverstripe-framework/pull/8118 is merged.