BoltAuth / Auth

Auth extension for Bolt
MIT License
16 stars 17 forks source link

[BUG] Database check says table `bolt_auth_token` is not the correct schema and can't fix it #19

Closed sylbru closed 6 years ago

sylbru commented 6 years ago

After upgrading to Bolt 3.4, the database check tool says:

Table bolt_auth_token is not the correct schema: invalid column token

Trying to update the database doesn't fix it. When I upgraded Bolt from 3.3 to 3.4, I had this problem with some core Bolt tables as well, and it was fixed when I upgraded to 3.4.2 (possibly with this? https://github.com/bolt/bolt/pull/7187/files). The issue remains only with BoltAuth.

Details

Reproduction

  1. Bug summary: Database check always says table bolt_auth_token is not the correct schema, no matter how many times I run the database update.
    1. Specifics: Bolt was installed with Composer. It uses SQLite.
    2. Steps to reproduce: [Due to the nature of the bug I can't try to reproduce it now, so I can't guarantee it is reproducible this way.]
      • Install Bolt 3.3
      • Install BoltAuth extension
      • Upgrade Bolt to 3.4
    3. Expected result:
      • Running the database check should not find any modifications needed. Or if it does, the database update should fix them.
    4. Actual result:
      • The database check always says "Table bolt_auth_token is not the correct schema: invalid column token"
sylbru commented 6 years ago

Closing because it's not a BoltAuth issue, will likely be closed in Bolt 3.4.3. Quick fix is to edit Bolt\Storage\Database\Schema\Comparison\Sqlite::setIgnoredChanges() and add the following inside the if block:

$this->ignoredChanges[] = new IgnoredChange('changedColumns', 'type', 'json_array', 'string');