Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

アップデート時に「SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name~」が出る #1256

Closed
theend12345678 opened this issue Dec 14, 2022 · 3 comments
Labels
bug Something isn't working - 不具合 wontfix

Comments

@theend12345678
Copy link

theend12345678 commented Dec 14, 2022

Describe the bug / バグの説明

アップデート時に「SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name~」というエラーが出る。

To Reproduce / 再現手順

手動アップデートを行うと発生。
内容からするとworkflow_valuesテーブルに列がすでにあるのにさらに追加しようとしているエラーのように見える。
ワークフローの機能は特に問題なく使える。

Version / 発生バージョン

5.0.0~5.0.4

Error log / エラーログ

[2022-12-14 15:49:22] local.ERROR: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'workflow_values_created_user_id_index' (SQL: alter table workflow_values add index workflow_values_created_user_id_index(created_user_id)) {"exception":"[object] (Illuminate\Database\QueryException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'workflow_values_created_user_id_index' (SQL: alter table workflow_values add index workflow_values_created_user_id_index(created_user_id)) at /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760)
[stacktrace]
#0 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\Database\Connection->runQueryCallback()
#1 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Connection.php(546): Illuminate\Database\Connection->run()
#2 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php(109): Illuminate\Database\Connection->statement()
#3 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(404): Illuminate\Database\Schema\Blueprint->build()
#4 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(251): Illuminate\Database\Schema\Builder->build()
#5 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(338): Illuminate\Database\Schema\Builder->table()
#6 /home/〇〇/〇〇/exment/vendor/exceedone/exment/database/migrations/2022_01_01_000000_workflow_patch.php(26): Illuminate\Support\Facades\Facade::__callStatic()
#7 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(481): WorkflowPatch->up()
#8 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(399): Illuminate\Database\Migrations\Migrator->runMethod()
#9 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(408): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}()
#10 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(209): Illuminate\Database\Migrations\Migrator->runMigration()
#11 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/View/Components/Task.php(36): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}()
#12 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(738): Illuminate\Console\View\Components\Task->render()
#13 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(209): Illuminate\Database\Migrations\Migrator->write()
#14 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(174): Illuminate\Database\Migrations\Migrator->runUp()
#15 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(117): Illuminate\Database\Migrations\Migrator->runPending()
#16 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(90): Illuminate\Database\Migrations\Migrator->run()
#17 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(615): Illuminate\Database\Console\Migrations\MigrateCommand->Illuminate\Database\Console\Migrations\{closure}()
#18 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(102): Illuminate\Database\Migrations\Migrator->usingConnection()
#19 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Database\Console\Migrations\MigrateCommand->handle()
#20 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#21 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#22 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#23 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\Container\BoundMethod::call()
#24 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call()
#25 /home/〇〇/〇〇/exment/vendor/symfony/console/Command/Command.php(291): Illuminate\Console\Command->execute()
#26 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Command.php(152): Symfony\Component\Console\Command\Command->run()
#27 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php(68): Illuminate\Console\Command->run()
#28 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php(28): Illuminate\Console\Command->runCommand()
#29 /home/〇〇/〇〇/exment/vendor/exceedone/exment/src/Console/UpdateCommand.php(76): Illuminate\Console\Command->call()
#30 /home/〇〇/〇〇/exment/vendor/exceedone/exment/src/Console/UpdateCommand.php(57): Exceedone\Exment\Console\UpdateCommand->initDatabase()
#31 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Exceedone\Exment\Console\UpdateCommand->handle()
#32 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#33 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#34 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#35 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\Container\BoundMethod::call()
#36 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call()
#37 /home/〇〇/〇〇/exment/vendor/symfony/console/Command/Command.php(291): Illuminate\Console\Command->execute()
#38 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Command.php(152): Symfony\Component\Console\Command\Command->run()
#39 /home/〇〇/〇〇/exment/vendor/symfony/console/Application.php(1014): Illuminate\Console\Command->run()
#40 /home/〇〇/〇〇/exment/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#41 /home/〇〇/〇〇/exment/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#42 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Application.php(102): Symfony\Component\Console\Application->run()
#43 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(155): Illuminate\Console\Application->run()
#44 /home/〇〇/〇〇/exment/artisan(37): Illuminate\Foundation\Console\Kernel->handle()
#45 {main}

[previous exception] [object] (Doctrine\DBAL\Driver\PDO\Exception(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'workflow_values_created_user_id_index' at /home/〇〇/〇〇/exment/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18)
[stacktrace]
#0 /home/〇〇/〇〇/exment/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(119): Doctrine\DBAL\Driver\PDO\Exception::new()
#1 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Connection.php(545): Doctrine\DBAL\Driver\PDOStatement->execute()
#2 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Connection.php(753): Illuminate\Database\Connection->Illuminate\Database\{closure}()
#3 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\Database\Connection->runQueryCallback()
#4 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Connection.php(546): Illuminate\Database\Connection->run()
#5 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php(109): Illuminate\Database\Connection->statement()
#6 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(404): Illuminate\Database\Schema\Blueprint->build()
#7 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(251): Illuminate\Database\Schema\Builder->build()
#8 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(338): Illuminate\Database\Schema\Builder->table()
#9 /home/〇〇/〇〇/exment/vendor/exceedone/exment/database/migrations/2022_01_01_000000_workflow_patch.php(26): Illuminate\Support\Facades\Facade::__callStatic()
#10 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(481): WorkflowPatch->up()
#11 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(399): Illuminate\Database\Migrations\Migrator->runMethod()
#12 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(408): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}()
#13 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(209): Illuminate\Database\Migrations\Migrator->runMigration()
#14 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/View/Components/Task.php(36): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}()
#15 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(738): Illuminate\Console\View\Components\Task->render()
#16 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(209): Illuminate\Database\Migrations\Migrator->write()
#17 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(174): Illuminate\Database\Migrations\Migrator->runUp()
#18 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(117): Illuminate\Database\Migrations\Migrator->runPending()
#19 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(90): Illuminate\Database\Migrations\Migrator->run()
#20 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(615): Illuminate\Database\Console\Migrations\MigrateCommand->Illuminate\Database\Console\Migrations\{closure}()
#21 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(102): Illuminate\Database\Migrations\Migrator->usingConnection()
#22 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Database\Console\Migrations\MigrateCommand->handle()
#23 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#24 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#25 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#26 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\Container\BoundMethod::call()
#27 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call()
#28 /home/〇〇/〇〇/exment/vendor/symfony/console/Command/Command.php(291): Illuminate\Console\Command->execute()
#29 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Command.php(152): Symfony\Component\Console\Command\Command->run()
#30 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php(68): Illuminate\Console\Command->run()
#31 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php(28): Illuminate\Console\Command->runCommand()
#32 /home/〇〇/〇〇/exment/vendor/exceedone/exment/src/Console/UpdateCommand.php(76): Illuminate\Console\Command->call()
#33 /home/〇〇/〇〇/exment/vendor/exceedone/exment/src/Console/UpdateCommand.php(57): Exceedone\Exment\Console\UpdateCommand->initDatabase()
#34 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Exceedone\Exment\Console\UpdateCommand->handle()
#35 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#36 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#37 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#38 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\Container\BoundMethod::call()
#39 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call()
#40 /home/〇〇/〇〇/exment/vendor/symfony/console/Command/Command.php(291): Illuminate\Console\Command->execute()
#41 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Command.php(152): Symfony\Component\Console\Command\Command->run()
#42 /home/〇〇/〇〇/exment/vendor/symfony/console/Application.php(1014): Illuminate\Console\Command->run()
#43 /home/〇〇/〇〇/exment/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#44 /home/〇〇/〇〇/exment/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#45 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Application.php(102): Symfony\Component\Console\Application->run()
#46 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(155): Illuminate\Console\Application->run()
#47 /home/〇〇/〇〇/exment/artisan(37): Illuminate\Foundation\Console\Kernel->handle()
#48 {main}

[previous exception] [object] (PDOException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'workflow_values_created_user_id_index' at /home/〇〇/〇〇/exment/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117)
[stacktrace]
#0 /home/〇〇/〇〇/exment/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(117): PDOStatement->execute()
#1 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Connection.php(545): Doctrine\DBAL\Driver\PDOStatement->execute()
#2 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Connection.php(753): Illuminate\Database\Connection->Illuminate\Database\{closure}()
#3 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\Database\Connection->runQueryCallback()
#4 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Connection.php(546): Illuminate\Database\Connection->run()
#5 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php(109): Illuminate\Database\Connection->statement()
#6 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(404): Illuminate\Database\Schema\Blueprint->build()
#7 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(251): Illuminate\Database\Schema\Builder->build()
#8 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(338): Illuminate\Database\Schema\Builder->table()
#9 /home/〇〇/〇〇/exment/vendor/exceedone/exment/database/migrations/2022_01_01_000000_workflow_patch.php(26): Illuminate\Support\Facades\Facade::__callStatic()
#10 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(481): WorkflowPatch->up()
#11 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(399): Illuminate\Database\Migrations\Migrator->runMethod()
#12 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(408): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}()
#13 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(209): Illuminate\Database\Migrations\Migrator->runMigration()
#14 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/View/Components/Task.php(36): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}()
#15 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(738): Illuminate\Console\View\Components\Task->render()
#16 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(209): Illuminate\Database\Migrations\Migrator->write()
#17 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(174): Illuminate\Database\Migrations\Migrator->runUp()
#18 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(117): Illuminate\Database\Migrations\Migrator->runPending()
#19 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(90): Illuminate\Database\Migrations\Migrator->run()
#20 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(615): Illuminate\Database\Console\Migrations\MigrateCommand->Illuminate\Database\Console\Migrations\{closure}()
#21 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(102): Illuminate\Database\Migrations\Migrator->usingConnection()
#22 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Database\Console\Migrations\MigrateCommand->handle()
#23 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#24 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#25 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#26 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\Container\BoundMethod::call()
#27 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call()
#28 /home/〇〇/〇〇/exment/vendor/symfony/console/Command/Command.php(291): Illuminate\Console\Command->execute()
#29 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Command.php(152): Symfony\Component\Console\Command\Command->run()
#30 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php(68): Illuminate\Console\Command->run()
#31 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php(28): Illuminate\Console\Command->runCommand()
#32 /home/〇〇/〇〇/exment/vendor/exceedone/exment/src/Console/UpdateCommand.php(76): Illuminate\Console\Command->call()
#33 /home/〇〇/〇〇/exment/vendor/exceedone/exment/src/Console/UpdateCommand.php(57): Exceedone\Exment\Console\UpdateCommand->initDatabase()
#34 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Exceedone\Exment\Console\UpdateCommand->handle()
#35 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#36 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#37 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#38 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\Container\BoundMethod::call()
#39 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call()
#40 /home/〇〇/〇〇/exment/vendor/symfony/console/Command/Command.php(291): Illuminate\Console\Command->execute()
#41 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Command.php(152): Symfony\Component\Console\Command\Command->run()
#42 /home/〇〇/〇〇/exment/vendor/symfony/console/Application.php(1014): Illuminate\Console\Command->run()
#43 /home/〇〇/〇〇/exment/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#44 /home/〇〇/〇〇/exment/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#45 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Console/Application.php(102): Symfony\Component\Console\Application->run()
#46 /home/〇〇/〇〇/exment/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(155): Illuminate\Console\Application->run()
#47 /home/〇〇/〇〇/exment/artisan(37): Illuminate\Foundation\Console\Kernel->handle()
#48 {main}
"}

Screenshots / スクリーンショット

image

Additional context / その他

Add any other context about the problem here. / その他に記載すべき内容がありましたら、ご記載ください。

@a0z0
Copy link

a0z0 commented Dec 15, 2022

暫定的なご提案です。
workflow_values_created_user_id_indexを削除してmigrationやり直せばよいのではないかと思います。

まずは、laravelのmigration処理がどこまでできているか現状確認してみてください。
2022_01_01_000000_workflow_patch で止まっているのでそれ以降のmigrationができていないはず。

# cd <exmentのパス>
# php artisan migrate:status
  Migration name ........................................................... Batch / Status
  2014_10_12_000000_create_users_table ............................................ [1] Ran
  2014_10_12_100000_create_password_resets_table .................................. [1] Ran
  2016_01_04_173148_create_admin_tables ........................................... [1] Ran
  2018_04_27_021034_create_table_define ........................................... [1] Ran
  2019_03_11_193513_patch_authoritable ............................................ [1] Ran
  2019_03_28_185921_oauth_clientid_uuid ........................................... [1] Ran
  2019_04_15_115120_support_for_v1_1 .............................................. [1] Ran
  2019_04_25_185014_drop_unique_keys .............................................. [1] Ran
  2019_05_18_164730_support_for_v1_2 .............................................. [1] Ran
  2019_05_23_165335_patch_user_accessable ......................................... [1] Ran
  2019_05_28_165146_create_custom_column_multi .................................... [1] Ran
  2019_06_06_130456_plugin_custom_option .......................................... [1] Ran
  2019_06_12_193431_support_for_v1_3 .............................................. [1] Ran
  2019_06_18_135639_update_custom_view_summary .................................... [1] Ran
  2019_07_11_105602_support_for_v1_4 .............................................. [1] Ran
  2019_07_12_120518_support_for_v2_0 .............................................. [1] Ran
  2019_08_07_095018_init_column ................................................... [1] Ran
  2019_08_19_000000_create_failed_jobs_table ...................................... [1] Ran
  2019_08_19_151648_support_for_v2_1 .............................................. [1] Ran
  2019_09_12_120518_support_for_v2_1_4 ............................................ [1] Ran
  2019_09_19_093842_support_for_v2_1_7 ............................................ [1] Ran
  2019_09_19_093842_support_for_v3_0_0 ............................................ [1] Ran
  2019_12_14_000001_create_personal_access_tokens_table ........................... [1] Ran
  2020_01_16_000000_remove_deleted_column ......................................... [1] Ran
  2020_02_20_155520_add_options_to_filters ........................................ [1] Ran
  2020_02_26_000000_add_notify_name ............................................... [1] Ran
  2020_03_22_000000_patch_dashboard_box ........................................... [1] Ran
  2020_04_02_000000_api_auth_api_key .............................................. [1] Ran
  2020_04_07_125924_add_options_to_workflows ...................................... [1] Ran
  2020_05_01_000000_patch_log_operation_update .................................... [1] Ran
  2020_05_05_000000_support_for_v3_2_0 ............................................ [1] Ran
  2020_06_14_000000_support_for_v3_3_0 ............................................ [1] Ran
  2020_06_16_000000_patch_form_column_relation .................................... [1] Ran
  2020_06_25_000000_append_view_column_suuid ...................................... [1] Ran
  2020_07_03_160259_support_for_v3_4_0 ............................................ [1] Ran
  2020_07_15_160217_external_custom_operation ..................................... [1] Ran
  2020_07_16_000000_patch_view_dashboard .......................................... [1] Ran
  2020_08_14_000000_patch_view_filters ............................................ [1] Ran
  2020_09_25_000000_update_notify_logic ........................................... [1] Ran
  2020_09_29_000000_workflow_value_view ........................................... [1] Ran
  2020_10_23_000000_patch_view_only ............................................... [1] Ran
  2020_12_15_000000_patch_calc_data ............................................... [1] Ran
  2021_01_05_000000_plugin_view ................................................... [1] Ran
  2021_02_13_000000_patch_condition_data .......................................... [1] Ran
  2021_03_05_000000_public_form_and_options ....................................... [1] Ran
  2021_04_21_165617_add_options_to_custom_view_sort ............................... [1] Ran
  2021_07_14_160709_add_column_type_to_operation .................................. [1] Ran
  2021_07_15_092440_patch_import_export_permission ................................ [1] Ran
  2021_12_02_000000_patch_mail_attachments ........................................ [1] Ran
  2022_01_01_000000_workflow_patch ................................................ [1] Ran
  2022_01_11_000000_patch_mail_custom_attachments ................................. [1] Ran
  2022_01_13_133748_patch_laravel8 ................................................ [1] Ran
  2022_01_18_000000_patch_custom_column_editable_userinfo ......................... [1] Ran
  2022_06_17_133748_patch_php8 .................................................... [2] Ran
  2022_10_07_000000_role_groups_patch_221007 ...................................... [3] Ran

失敗したmigrationファイルのrollbackをやってみる。

# cd <exmentのパス>
# php artisan migrate:rollback --path=vendor/exceedone/exment/database/migrations/2022_01_01_000000_workflow_patch

できなげば、workflow_values_created_user_id_indexを手動で削除。
あとは、laravelのmigrationかexmentのupdate処理

# cd <exmentのパス>
# php artisan migrate

解決しなかったらすみません。バックアップとって作業してください。
参考:
https://qiita.com/rope19181/items/c7862f9a0a22443ddb48

@theend12345678
Copy link
Author

暫定的なご提案です。 workflow_values_created_user_id_indexを削除してmigrationやり直せばよいのではないかと思います。

まずは、laravelのmigration処理がどこまでできているか現状確認してみてください。 2022_01_01_000000_workflow_patch で止まっているのでそれ以降のmigrationができていないはず。

# cd <exmentのパス>
# php artisan migrate:status
  Migration name ........................................................... Batch / Status
  2014_10_12_000000_create_users_table ............................................ [1] Ran
  2014_10_12_100000_create_password_resets_table .................................. [1] Ran
  2016_01_04_173148_create_admin_tables ........................................... [1] Ran
  2018_04_27_021034_create_table_define ........................................... [1] Ran
  2019_03_11_193513_patch_authoritable ............................................ [1] Ran
  2019_03_28_185921_oauth_clientid_uuid ........................................... [1] Ran
  2019_04_15_115120_support_for_v1_1 .............................................. [1] Ran
  2019_04_25_185014_drop_unique_keys .............................................. [1] Ran
  2019_05_18_164730_support_for_v1_2 .............................................. [1] Ran
  2019_05_23_165335_patch_user_accessable ......................................... [1] Ran
  2019_05_28_165146_create_custom_column_multi .................................... [1] Ran
  2019_06_06_130456_plugin_custom_option .......................................... [1] Ran
  2019_06_12_193431_support_for_v1_3 .............................................. [1] Ran
  2019_06_18_135639_update_custom_view_summary .................................... [1] Ran
  2019_07_11_105602_support_for_v1_4 .............................................. [1] Ran
  2019_07_12_120518_support_for_v2_0 .............................................. [1] Ran
  2019_08_07_095018_init_column ................................................... [1] Ran
  2019_08_19_000000_create_failed_jobs_table ...................................... [1] Ran
  2019_08_19_151648_support_for_v2_1 .............................................. [1] Ran
  2019_09_12_120518_support_for_v2_1_4 ............................................ [1] Ran
  2019_09_19_093842_support_for_v2_1_7 ............................................ [1] Ran
  2019_09_19_093842_support_for_v3_0_0 ............................................ [1] Ran
  2019_12_14_000001_create_personal_access_tokens_table ........................... [1] Ran
  2020_01_16_000000_remove_deleted_column ......................................... [1] Ran
  2020_02_20_155520_add_options_to_filters ........................................ [1] Ran
  2020_02_26_000000_add_notify_name ............................................... [1] Ran
  2020_03_22_000000_patch_dashboard_box ........................................... [1] Ran
  2020_04_02_000000_api_auth_api_key .............................................. [1] Ran
  2020_04_07_125924_add_options_to_workflows ...................................... [1] Ran
  2020_05_01_000000_patch_log_operation_update .................................... [1] Ran
  2020_05_05_000000_support_for_v3_2_0 ............................................ [1] Ran
  2020_06_14_000000_support_for_v3_3_0 ............................................ [1] Ran
  2020_06_16_000000_patch_form_column_relation .................................... [1] Ran
  2020_06_25_000000_append_view_column_suuid ...................................... [1] Ran
  2020_07_03_160259_support_for_v3_4_0 ............................................ [1] Ran
  2020_07_15_160217_external_custom_operation ..................................... [1] Ran
  2020_07_16_000000_patch_view_dashboard .......................................... [1] Ran
  2020_08_14_000000_patch_view_filters ............................................ [1] Ran
  2020_09_25_000000_update_notify_logic ........................................... [1] Ran
  2020_09_29_000000_workflow_value_view ........................................... [1] Ran
  2020_10_23_000000_patch_view_only ............................................... [1] Ran
  2020_12_15_000000_patch_calc_data ............................................... [1] Ran
  2021_01_05_000000_plugin_view ................................................... [1] Ran
  2021_02_13_000000_patch_condition_data .......................................... [1] Ran
  2021_03_05_000000_public_form_and_options ....................................... [1] Ran
  2021_04_21_165617_add_options_to_custom_view_sort ............................... [1] Ran
  2021_07_14_160709_add_column_type_to_operation .................................. [1] Ran
  2021_07_15_092440_patch_import_export_permission ................................ [1] Ran
  2021_12_02_000000_patch_mail_attachments ........................................ [1] Ran
  2022_01_01_000000_workflow_patch ................................................ [1] Ran
  2022_01_11_000000_patch_mail_custom_attachments ................................. [1] Ran
  2022_01_13_133748_patch_laravel8 ................................................ [1] Ran
  2022_01_18_000000_patch_custom_column_editable_userinfo ......................... [1] Ran
  2022_06_17_133748_patch_php8 .................................................... [2] Ran
  2022_10_07_000000_role_groups_patch_221007 ...................................... [3] Ran

失敗したmigrationファイルのrollbackをやってみる。

# cd <exmentのパス>
# php artisan migrate:rollback --path=vendor/exceedone/exment/database/migrations/2022_01_01_000000_workflow_patch

できなげば、workflow_values_created_user_id_indexを手動で削除。 あとは、laravelのmigrationかexmentのupdate処理

# cd <exmentのパス>
# php artisan migrate

解決しなかったらすみません。バックアップとって作業してください。 参考: https://qiita.com/rope19181/items/c7862f9a0a22443ddb48

ありがとうございます。

migrationファイルのrollbackはだめでした。
image

インデックスを削除してのupdate再実行するとview_workflow_value_unionsがviewではないとのこと。
削除したインデックスは再作成され、同じエラーが出るようになりました。
image

いつまでも教えて君ではダメなので、少しずつ調べていこうと思います。

@stale
Copy link

stale bot commented Aug 10, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Aug 10, 2023
@stale stale bot closed this as completed Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working - 不具合 wontfix
Projects
None yet
Development

No branches or pull requests

2 participants