craftcms / commerce

Fully integrated ecommerce for Craft CMS.
https://craftcms.com/commerce
Other
215 stars 169 forks source link

[5.x]: Can't install Commerce 5 with PostgreSQL #3486

Closed boboldehampsink closed 2 months ago

boboldehampsink commented 2 months ago

What happened?

Description

Can't install Commerce 5 with PostgreSQL, probably because the "siteId" column isn't properly quoted (as Postgres is case-sensitive):

web-1  | *** applying m230110_052712_site_stores
web-1  |     > create table {{%commerce_site_stores}} ...Exception: SQLSTATE[42703]: Undefined column: 7 ERROR:  column "siteid" named in key does not exist at character 211
web-1  | The SQL being executed was: CREATE TABLE "commerce_site_stores" (
web-1  |        "siteId" integer,
web-1  |        "storeId" integer NULL DEFAULT NULL,
web-1  |        "dateCreated" timestamp(0) NOT NULL,
web-1  |        "dateUpdated" timestamp(0) NOT NULL,
web-1  |        "uid" char(36) NOT NULL DEFAULT '0',
web-1  |        PRIMARY KEY(siteId)
web-1  | ) (/app/user/vendor/yiisoft/yii2/db/Schema.php:676)

Steps to reproduce

Install Commerce 5 on PostgreSQL

Craft CMS version

5

Craft Commerce version

5

PHP version

8.3

Operating system and version

No response

Database type and version

PostgreSQL 15.3

Image driver and version

No response

Installed plugins and versions

-

linear[bot] commented 2 months ago

PT-1705 [5.x]: Can't install Commerce 5 with PostgreSQL

lukeholder commented 2 months ago

Thanks, will be in the next release.