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

When attempting to update from 1.1.4 to 1.1.5, I get a Migration fail error... #8

Closed
kjmartens opened this issue May 30, 2018 · 3 comments

Comments

@kjmartens
Copy link

One of Campaign’s migrations failed.

Database Exception: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'mailingListId'
The SQL being executed was: ALTER TABLE campaign_contacts_campaigns ADD mailingListId int(11) NOT NULL AFTER sendoutId

Migration: putyourlightson\campaign\migrations\m180329_120000_sendout_sending

Output:

> add column mailingListId integer NOT NULL AFTER sendoutId to table {{%campaign_contacts_campaigns}} ...Exception: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'mailingListId'
The SQL being executed was: ALTER TABLE campaign_contacts_campaigns ADD mailingListId int(11) NOT NULL AFTER sendoutId (/my/path/vendor/yiisoft/yii2/db/Schema.php:664)
#0 /my/path/vendor/yiisoft/yii2/db/Command.php(1263): yii\db\Schema->convertException(Object(PDOException), 'ALTER TABLE ca...')
#1 /my/path/vendor/yiisoft/yii2/db/Command.php(1075): yii\db\Command->internalExecute('ALTER TABLE ca...')
#2 /my/path/vendor/yiisoft/yii2/db/Migration.php(377): yii\db\Command->execute()
#3 /my/path/vendor/putyourlightson/craft-campaign/src/migrations/m180329_120000_sendout_sending.php(20): yii\db\Migration->addColumn('{{%campaign_con...', 'mailingListId', Object(craft\db\mysql\ColumnSchemaBuilder))
#4 /my/path/vendor/craftcms/cms/src/db/Migration.php(56): putyourlightson\campaign\migrations\m180329_120000_sendout_sending->safeUp()
#5 /my/path/vendor/craftcms/cms/src/db/MigrationManager.php(243): craft\db\Migration->up(true)
#6 /my/path/vendor/craftcms/cms/src/db/MigrationManager.php(163): craft\db\MigrationManager->migrateUp(Object(putyourlightson\campaign\migrations\m180329_120000_sendout_sending))
#7 /my/path/vendor/craftcms/cms/src/services/Updates.php(216): craft\db\MigrationManager->up()
#8 /my/path/vendor/craftcms/cms/src/controllers/BaseUpdaterController.php(435): craft\services\Updates->runMigrations(Array)
#9 /my/path/vendor/craftcms/cms/src/controllers/UpdaterController.php(207): craft\controllers\BaseUpdaterController->runMigrations(Array, 'restore-db')
#10 [internal function]: craft\controllers\UpdaterController->actionMigrate()
#11 /my/path/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#12 /my/path/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#13 /my/path/vendor/craftcms/cms/src/web/Controller.php(103): yii\base\Controller->runAction('migrate', Array)
#14 /my/path/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('migrate', Array)
#15 /my/path/vendor/craftcms/cms/src/web/Application.php(273): yii\base\Module->runAction('updater/migrate', Array)
#16 /my/path/vendor/craftcms/cms/src/web/Application.php(643): craft\web\Application->runAction('updater/migrate')
#17 /my/path/vendor/craftcms/cms/src/web/Application.php(227): craft\web\Application->_processUpdateLogic(Object(craft\web\Request))
#18 /my/path/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#19 /my/path/web/index.php(21): yii\base\Application->run()
#20 {main}

Not sure if you need anything else from me :D

@putyourlightson
Copy link
Collaborator

Very strange, the migration file m180329_120000_sendout_sending.php was from back in the beta. Was the update able to complete even with this error message or what is the status of the plugin now?

@kjmartens
Copy link
Author

I believe I first installed it during the beta. I'm only using the plugin currently to test with the mailing list integration in Freeform as you know, 😄 so it's not mission critical for me, and I just manually loaded 1.1.4 to get around the migration error. I assumed this may affect someone else.

@putyourlightson
Copy link
Collaborator

Ok, thanks for the report, nobody else has seemed to have had the issue so am assuming it's something to do with how you updated at some stage.

Thanks again for the Freeform integration!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant