Page MenuHomePhabricator

ALTER TABLE ... CHANGE ... syntax blocks installation or update on SQLite
Closed, DeclinedPublic

Description

Commits 873cbbca3e61 and 1a5e4802 introduced database update instructions preventing Flow installation or update on SQLite:

In extensions/Flow/db_patches/patch-ref_target_not_null.sql:

Query: ALTER TABLE flow_ext_ref CHANGE ref_target ref_target BLOB NOT NULL

Error: 1 near "CHANGE": syntax error

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 21 2016, 3:48 PM
Dereckson renamed this task from Can't install Flow on SQLite to ALTER TABLE ... CHANGE ... syntax blocks installation or update on SQLite.Jun 21 2016, 4:06 PM
Dereckson updated the task description. (Show Details)

SQLite doesn't have the ALTER CHANGE statement (or any other way to mutate a column type)

What do we have as solutions?

1. Suggest a manual update

Provide manual instructions to site administrators, so they can choose the best method suitable.

In some case for example, we can rewrite the SQL schema: http://stackoverflow.com/a/6684034/1930997 (but not sure for the blob type)

2. Use a temporary table

Jaime suggests if we really want to support that, as the worst case scenario to use a temporary table: CREATE; INSERT...SELECT; DROP; RENAME;

3. Make a statement the extension doesn't support SQLite.

The extension is intended to environments with multiple users to discuss together

Such environments tend to use MySQL, not SQLite.

Dereckson moved this task from Backlog to Schema needed on the SQLite board.May 20 2017, 10:18 AM
Restricted Application added a project: Growth-Team. · View Herald TranscriptAug 21 2018, 10:17 PM
MMiller_WMF closed this task as Declined.Sep 4 2018, 5:50 PM
MMiller_WMF added a subscriber: MMiller_WMF.

Unfortunately, we will not be able to support SQLite for installation of Structured Discussions, since that is a relatively infrequent use case. We are going to document on Mediawiki.org that SQLite is not supported.