Hello,
I have a problem in my new server Passbolt.
I created a new vm with new version of Passbolt CE and imported old db that i have on a passbolt version 2.7.
I had to delete the table email_queue in the new db cause it was very large and during the passbolt migrate i received an error for table too large.
Now I’m having problem when i launch command
sudo -H -u nginx /bin/bash -c “/usr/share/php/passbolt/bin/cake migrations migrate --no-lock”
It gives an error and i don’t know how to solve.
using migration paths
- /etc/passbolt/Migrations
using seed paths - /etc/passbolt/Seeds
using environment default
using adapter mysql
using database passbolt
ordering by creation time
== 20211215180000 V350RemovePermissionsTypeIndex: migrating
InvalidArgumentException: The specified index on columns ‘type’ does not exist in /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/MysqlAdapter.php:717
Stack trace:
#0 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(919): Phinx\Db\Adapter\MysqlAdapter->getDropIndexByColumnsInstructions()
#1 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php(484): Phinx\Db\Adapter\PdoAdapter->executeActions()
#2 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/TimedOutputAdapter.php(420): Phinx\Db\Adapter\AdapterWrapper->executeActions()
#3 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php(484): Phinx\Db\Adapter\TimedOutputAdapter->executeActions()
#4 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Plan/Plan.php(151): Phinx\Db\Adapter\AdapterWrapper->executeActions()
#5 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Table.php(715): Phinx\Db\Plan\Plan->execute()
#6 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Table.php(623): Phinx\Db\Table->executeActions()
#7 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Table.php(152): Phinx\Db\Table->update()
#8 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Table.php(682): Migrations\Table->update()
#9 /etc/passbolt/Migrations/20211215180000_V350RemovePermissionsTypeIndex.php(21): Phinx\Db\Table->save()
#10 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Migration/Manager/Environment.php(111): V350RemovePermissionsTypeIndex->up()
#11 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(385): Phinx\Migration\Manager\Environment->executeMigration()
#12 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(359): Phinx\Migration\Manager->executeMigration()
#13 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Console/Command/Migrate.php(122): Phinx\Migration\Manager->migrate()
#14 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Command/Phinx/CommandTrait.php(37): Phinx\Console\Command\Migrate->execute()
#15 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Command/Phinx/Migrate.php(85): Migrations\Command\Phinx\Migrate->parentExecute()
#16 /usr/share/php/passbolt/vendor/symfony/console/Command/Command.php(298): Migrations\Command\Phinx\Migrate->execute()
#17 /usr/share/php/passbolt/vendor/symfony/console/Application.php(1028): Symfony\Component\Console\Command\Command->run()
#18 /usr/share/php/passbolt/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand()
#19 /usr/share/php/passbolt/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#20 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Command/MigrationsCommand.php(126): Symfony\Component\Console\Application->run()
#21 /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Console/BaseCommand.php(179): Migrations\Command\MigrationsCommand->execute()
#22 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Command/MigrationsCommand.php(198): Cake\Console\BaseCommand->run()
#23 /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Console/CommandRunner.php(334): Migrations\Command\MigrationsCommand->run()
#24 /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Console/CommandRunner.php(172): Cake\Console\CommandRunner->runCommand()
#25 /usr/share/php/passbolt/bin/cake.php(13): Cake\Console\CommandRunner->run()
#26 {main}
I saw that there is another topic like mine so i tried to launch some commands to know if the y should help me to solve. Here are the results:
sudo su -s /bin/bash -c “/usr/share/php/passbolt/bin/cake migrations status” nginx
using migration paths
- /etc/passbolt/Migrations
using seed paths - /etc/passbolt/Seeds
using environment default
Status Migration ID Migration Name
up 20170830064410 V162InitialMigration
up 20170830065037 V200ActiveMustBeBoolean
up 20170830065038 V200DropUnusedProfileFields
up 20170830065039 V200IncreaseEmailSize
up 20170830065040 V200DropUnusedCreatedBy
up 20170830065041 V200MigrateUUID
up 20170830065042 V200MigrateKeyField
up 20171002061834 V200DropUnusedResourceFields
up 20171006141922 V200AddFavoriteModifiedField
up 20171009093000 V200DropUnusedPermissionTypesTable
up 20171009093001 V200MigrateEmailsTable
up 20171009093002 V200MigrateFileStorageTable
up 20171025154754 V200AddCommentsUserIdField
up 20180102065042 V200MigrateForeignIdField
up 20180102180000 V200DropUnusedTables
up 20180102221500 V200AddMissingTablesIndexes
up 20180413171600 V202ForceColumnsCharset
up 20180503135810 V210InstallAccountSettingsPlugin
up 20180930151500 V240AddAuthenticationTokenType
up 20181002171600 V240ExtendAccountSettingsPlugin
up 20181210170000 V270AddMissingIndexes
up 20190106170300 V280AdditionalEmailMigration
up 20190106170301 V280AdditionalFileStorageMigration
up 20190106170302 V280FileDirectoryPathsMigrations
up 20190112124290 V270AddActionsTable
up 20190112124300 V270AddActionLogsTable
up 20190121111100 V270AddEntitiesHistoryTable
up 20190121121100 V270AddPermissionsHistoryTable
up 20190211124300 V270AddSecretsHistoryTable
up 20190221124300 V270AddSecretAccessesTable
up 20190512115400 V2100AddOrganizationSettingsTable
up 20190623143400 V2110ExtendKeyIdSizeField
up 20190923103000 V2120UpdateEmailQueue
up 20191119160000 V2120DropUnusedTables
up 20200108135000 V2130DropLegacyAnonymousUser
up 20200319135000 V2130SoftDeleteGpgKeysForSoftDeletedUsers
up 20200501182000 V2130ReconcileLoginHistory
up 20200806110200 V300ExtendSecretsDataField
up 20200806110201 V300AddResourceTypeIdField
up 20200806110202 V300AddResourceTypesTable
up 20200806110203 V300AddResourceTypesDefaultData
up 20200806110204 V300AddResourceTypesToResources
up 20200824191900 V2136CleanupUnusedActionLogs
up 20200824191901 V2136AddActionLogsRelatedIndexes
up 20201221093528 V300DeleteMetadataOfSoftDeletedResources
up 20210111163200 V300AddActionLogsExtraIndex
up 20210121141742 V320AddAvatarsTable
up 20210125212543 V320TransferFileStorageToAvatars
up 20210206521254 V320DropFileStorage
up 20210329110000 V320FixResourceTypesDefaultData
up 20210427124200 V330AddMobileTransferTable
up 20211027202137 V331ConvertEmailVariablesToJson
up 20211121231300 V340MigrateASCIIFieldsEncoding
up 20211122732400 V350ConvertIdFieldsToUuidFields
down 20211215180000 V350RemovePermissionsTypeIndex
down 20211215180001 V350AddPermissionsCombinedIndex
down 20220103180000 V350IncreaseResourcesNameUsernameColumnsSize
down 20220103180001 V350IncreaseResourcesNameUsernameLengthInResourceTypes
down 20220405232411 V360RemoveAuthLoginLoginGetActionFromLogs
down 20220405234003 V360RemoveAuthCheckSessionCheckSessionGetFromLogs
down 20220405234359 V360RemoveAuthIsAuthenticatedIsAuthenticatedFromLogs
down 20220802151030 V380AlterNameAndSlugOnResourceTypes
down 20220802151740 V380TrimSpacesOnResourceTypesNameAndSlug
sudo su -s /bin/bash -c “/usr/share/php/passbolt/bin/cake passbolt cleanup” nginx
____ __ ____
/ __ \____ _____ ____/ /_ ____ / / /_
/ // / __ `/ / / __ / __ / / _/
/ / // ( | ) // / // / / /
// _,///./_//__/
Open source password manager for teams
Cleanup shell (fix mode)
No issue found, data looks squeaky clean!
Could you help me?Thanks