Skip to content

Instantly share code, notes, and snippets.

@Strubbl
Forked from nicosomb/fix.md
Last active January 30, 2017 19:33
Show Gist options
  • Save Strubbl/9989fc983d901ad7cfe6c85741cbb900 to your computer and use it in GitHub Desktop.
Save Strubbl/9989fc983d901ad7cfe6c85741cbb900 to your computer and use it in GitHub Desktop.
Fix for wallabag 2.2 and SQLite

After upgrading wallabag to 2.2, if you use SQLite for database, you may have a blank page or an internal server error (error 500). It can be due to migrations which failed.

The migrations which failed are migrations which try to create new columns on tables.

To fix this problem, please execute these commands on your webserver:

    php bin/console doctrine:migration:execute 20161024212538 -e=prod
    php bin/console doctrine:migration:execute 20161106113822 -e=prod
    php bin/console doctrine:migration:execute 20161118134328 -e=prod
    php bin/console doctrine:migration:execute 20161128084725 -e=prod
    php bin/console doctrine:migration:execute 20161214094402 -e=prod

If for some commands, you have this error:

    ++ migrating 20161118134328
    -> ALTER TABLE wallabag_entry ADD COLUMN http_status VARCHAR(3) DEFAULT NULL
    Migration 20161118134328 failed during Post-Checks. Error An exception occurred while executing 'INSERT INTO migration_versions (version) VALUES (?)' with params ["20161118134328"]:
    SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: migration_versions.version

Please open your database like this:

    sqlite3 data/db/wallabag.sqlite

Then, execute this query (replace 20161118134328 with the migration version which failed):

delete from migration_versions where version = ‘20161118134328’

Then, re-execute the command which failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment