Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Unable to migrate to latest db version #662

Closed
honzabilek4 opened this issue Dec 17, 2018 · 0 comments
Closed

Unable to migrate to latest db version #662

honzabilek4 opened this issue Dec 17, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@honzabilek4
Copy link

On master branch (e32b10b) it is now impossible to successfully run db:upgrade.
The error output looks like following:

Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP COLUMN `scope`; check that it exists in /Users/janbilek/Projects/directus7-api/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php on line 134

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP COLUMN `scope`; check that it exists in /Users/janbilek/Projects/directus7-api/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php on line 134

Call Stack:
    0.0098     389464   1. {main}() /Users/janbilek/Projects/directus7-api/bin/directus:0
    0.2175    1632376   2. Directus\Console\Cli->run() /Users/janbilek/Projects/directus7-api/bin/directus:9
    0.2175    1632376   3. Directus\Console\Cli->cmd() /Users/janbilek/Projects/directus7-api/src/core/Directus/Console/Cli.php:62
    0.2176    1632440   4. Directus\Console\Modules\DatabaseModule->runCommand(???, ???, ???) /Users/janbilek/Projects/directus7-api/src/core/Directus/Console/Cli.php:85
    0.2176    1632480   5. Directus\Console\Modules\DatabaseModule->cmdUpgrade(???, ???) /Users/janbilek/Projects/directus7-api/src/core/Directus/Console/Modules/ModuleBase.php:59
    0.2202    1739952   6. Directus\Util\Installation\InstallerUtils::updateTables(???, ???) /Users/janbilek/Projects/directus7-api/src/core/Directus/Console/Modules/DatabaseModule.php:54
    0.2301    1917152   7. Directus\Util\Installation\InstallerUtils::runMigrationAndSeeder(???) /Users/janbilek/Projects/directus7-api/src/core/Directus/Util/Installation/InstallerUtils.php:123
    0.2438    2220728   8. Phinx\Migration\Manager->migrate(???, ???) /Users/janbilek/Projects/directus7-api/src/core/Directus/Util/Installation/InstallerUtils.php:136
    0.4301    3004448   9. Phinx\Migration\Manager->executeMigration(???, ???, ???) /Users/janbilek/Projects/directus7-api/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php:351
    0.4302    3004448  10. Phinx\Migration\Manager\Environment->executeMigration(???, ???) /Users/janbilek/Projects/directus7-api/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php:375
    0.4303    3004448  11. RemoveScope->up() /Users/janbilek/Projects/directus7-api/vendor/robmorgan/phinx/src/Phinx/Migration/Manager/Environment.php:127
    0.4304    3004608  12. Phinx\Db\Table->removeColumn(???) /Users/janbilek/Projects/directus7-api/migrations/upgrades/schemas/20181123171520_remove_scope.php:11
    0.4304    3004608  13. Phinx\Db\Adapter\TimedOutputAdapter->dropColumn(???, ???) /Users/janbilek/Projects/directus7-api/vendor/robmorgan/phinx/src/Phinx/Db/Table.php:381
    0.4304    3005304  14. Phinx\Db\Adapter\TimedOutputAdapter->dropColumn(???, ???) /Users/janbilek/Projects/directus7-api/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/TimedOutputAdapter.php:222
    0.4305    3005304  15. Phinx\Db\Adapter\MysqlAdapter->dropColumn(???, ???) /Users/janbilek/Projects/directus7-api/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php:423
    0.4305    3005624  16. Phinx\Db\Adapter\MysqlAdapter->execute(???) /Users/janbilek/Projects/directus7-api/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/MysqlAdapter.php:470
    0.4305    3005624  17. PDO->exec(???) /Users/janbilek/Projects/directus7-api/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:134

@wellingguzman wellingguzman added this to To do in v2.0.13 Dec 17, 2018
@wellingguzman wellingguzman added the bug Something isn't working label Dec 17, 2018
@wellingguzman wellingguzman added this to Needs triage in Bug Triage via automation Dec 17, 2018
@wellingguzman wellingguzman moved this from Needs triage to Critical in Bug Triage Dec 17, 2018
@wellingguzman wellingguzman moved this from To do to In progress in v2.0.13 Dec 17, 2018
Bug Triage automation moved this from Critical to Closed Dec 17, 2018
@wellingguzman wellingguzman moved this from In progress to Done in v2.0.13 Dec 17, 2018
samvasko pushed a commit to samvasko/api that referenced this issue Nov 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
Bug Triage
  
Closed
v2.0.13
  
Done
Development

No branches or pull requests

2 participants