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

Unknown column 'commerce_orders.totalDiscount' in 'field list' #1285

Closed
matthisamoto opened this issue Feb 18, 2020 · 3 comments
Closed

Unknown column 'commerce_orders.totalDiscount' in 'field list' #1285

matthisamoto opened this issue Feb 18, 2020 · 3 comments

Comments

@matthisamoto
Copy link

Description

I attempted to update Craft Commerce to the current version 3.0.8 from being detached previously based on another issue #1272 (comment) by putting my composer.json back to 3.0.5 and going into the admin to do the updates. Once these completed, I am getting this error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'commerce_orders.totalDiscount' in 'field list'

This seems like a failed migration at some point in the process?

This was previously a Craft 2/Commerce 1 instance that was updated to Craft 3/Commerce 2 in January, and then to Craft 3.4/Commerce 3 in recent weeks.

Steps to reproduce

  1. Reset Commerce version to previous state v3.0.5 in composer.json from detached commit
  2. Update Craft Commerce to current 3.0.8

Additional info

PHP version 7.3.14
OS version Linux 3.10.0-957.27.2.el7.x86_64
Database driver & version MySQL 5.7.29
Image driver & version GD 7.3.14
Craft edition & version Craft Pro 3.4.6.1
Yii version 2.0.32
Twig version 2.12.5
Guzzle version 6.5.1
Imagine version 1.2.3-dev

@nfourtythree
Copy link
Contributor

Hi @matthisamoto

I have just tested the update again this morning and everything seemed to work correctly.

Could you please send your pre-updatecomposer.json, composer.lock and a DB dump to support@craftcms.com. We can then look into what might be happening here.

Thanks!

@nfourtythree
Copy link
Contributor

Hi @matthisamoto

Thank you for the info you sent to support. I have pushed a fix and new release for this.

You can now composer require craftcms/commerce:3.0.9, hitting the admin should ask you do run some migrations and you should be good to go!

Thanks!

@matthisamoto
Copy link
Author

Thank you @nfourtythree!! Works like a charm.

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

2 participants