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

3.6.1 Migration error when 'location' column already exists in content table #180

Closed
shornuk opened this issue Jul 20, 2019 · 2 comments
Closed

Comments

@shornuk
Copy link

shornuk commented Jul 20, 2019

Description

Migration seems to fail. Error seem to indicate that it's because I already have a column named field_location which is presumably what the plugin is trying to create?

@Tam Tam closed this as completed in 3fd87b0 Jul 23, 2019
@tomdeleu
Copy link

I'm having the same issue, when trying to update from 3.5.2 to 3.6.2.2.

Any thoughts?

Full error:

Database Exception: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'field_dealerAddress'
The SQL being executed was: ALTER TABLE content ADD field_dealerAddress text

Migration: ether\simplemap\migrations\m190712_104805_new_data_format

Output:

1. Creating Maps content columns
- Create content column for Dealer adres in content table
> add column field_dealerAddress text to table {{%content}} ...Exception: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'field_dealerAddress'
The SQL being executed was: ALTER TABLE content ADD field_dealerAddress text (/Users/tomdeleu/git/likami2019/vendor/yiisoft/yii2/db/Schema.php:664)
#0 /Users/tomdeleu/git/likami2019/vendor/yiisoft/yii2/db/Command.php(1295): yii\db\Schema->convertException(Object(PDOException), 'ALTER TABLE co...')
#1 /Users/tomdeleu/git/likami2019/vendor/yiisoft/yii2/db/Command.php(1091): yii\db\Command->internalExecute('ALTER TABLE co...')
#2 /Users/tomdeleu/git/likami2019/vendor/yiisoft/yii2/db/Migration.php(377): yii\db\Command->execute()
#3 /Users/tomdeleu/git/likami2019/vendor/ether/simplemap/src/migrations/m190712_104805_new_data_format.php(109): yii\db\Migration->addColumn('{{%content}}', 'field_dealerAdd...', 'text')
#4 /Users/tomdeleu/git/likami2019/vendor/craftcms/cms/src/db/Migration.php(56): ether\simplemap\migrations\m190712_104805_new_data_format->safeUp()
#5 /Users/tomdeleu/git/likami2019/vendor/craftcms/cms/src/db/MigrationManager.php(243): craft\db\Migration->up(true)
#6 /Users/tomdeleu/git/likami2019/vendor/craftcms/cms/src/db/MigrationManager.php(163): craft\db\MigrationManager->migrateUp(Object(ether\simplemap\migrations\m190712_104805_new_data_format))
#7 /Users/tomdeleu/git/likami2019/vendor/craftcms/cms/src/services/Updates.php(225): craft\db\MigrationManager->up()
#8 /Users/tomdeleu/git/likami2019/vendor/craftcms/cms/src/controllers/BaseUpdaterController.php(521): craft\services\Updates->runMigrations(Array)
#9 /Users/tomdeleu/git/likami2019/vendor/craftcms/cms/src/controllers/UpdaterController.php(208): craft\controllers\BaseUpdaterController->runMigrations(Array, 'restore-db')
#10 [internal function]: craft\controllers\UpdaterController->actionMigrate()
#11 /Users/tomdeleu/git/likami2019/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#12 /Users/tomdeleu/git/likami2019/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#13 /Users/tomdeleu/git/likami2019/vendor/craftcms/cms/src/web/Controller.php(187): yii\base\Controller->runAction('migrate', Array)
#14 /Users/tomdeleu/git/likami2019/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('migrate', Array)
#15 /Users/tomdeleu/git/likami2019/vendor/craftcms/cms/src/web/Application.php(299): yii\base\Module->runAction('updater/migrate', Array)
#16 /Users/tomdeleu/git/likami2019/vendor/craftcms/cms/src/web/Application.php(653): craft\web\Application->runAction('updater/migrate')
#17 /Users/tomdeleu/git/likami2019/vendor/craftcms/cms/src/web/Application.php(251): craft\web\Application->_processUpdateLogic(Object(craft\web\Request))
#18 /Users/tomdeleu/git/likami2019/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#19 /Users/tomdeleu/git/likami2019/web/index.php(21): yii\base\Application->run()
#20 {main}

@ademers
Copy link

ademers commented Jul 24, 2019

I'm also having this issue on when attempting to update from 3.5.2 to 3.6.2.2 via Composer on Craft 3.2.6.

Database Exception: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'field_eventLocation'
The SQL being executed was: ALTER TABLE craft_content ADD field_eventLocation text
Migration: ether\simplemap\migrations\m190712_104805_new_data_format

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

3 participants