solspace / craft-freeform

Freeform for Craft: The most reliable form builder that's ready for wherever your project takes you.
https://docs.solspace.com/craft/freeform/v5/
Other
47 stars 60 forks source link

Update to 4.1.20 causes migration error on Postgres db #1456

Closed aaronrobb closed 2 months ago

aaronrobb commented 3 months ago

What happened?

When updating Craft to use Freeform 4.1.20, after we run migrations, we get an error stating that "ERROR: type "longtext" does not exist".

This is using a postgres DB.

Downgrading to Freeform 4.1.19 makes the migrations work as expected.

Errors and Stack Trace (if available)

*** applying m240724_104556_UpdateLayoutJsonColumnFromTextToLongTextOnFormsTable
  > execute SQL: ALTER TABLE {{%freeform_forms}} ALTER COLUMN [[layoutJson]] TYPE LONGTEXT ...Exception: SQLSTATE[42704]: Undefined object: 7 ERROR: type "longtext" does not exist
The SQL being executed was: ALTER TABLE "freeform_forms" ALTER COLUMN "layoutJson" TYPE LONGTEXT (/vendor/yiisoft/yii2/db/Schema.php:676)

How can we reproduce this?

  1. Install Craft 4 on a machine using a Postgres DB.
  2. Update Freeform to 4.1.20
  3. Run migrations.

Freeform Edition

Pro

Freeform Version

4.1.20

Craft Version

4.11.0

When did this issue start?

After upgrading from older Freeform version

Previous Freeform Version

No response

kjmartens commented 3 months ago

Sorry for the trouble and the delay @aaronrobb,

I will have a developer check into this issue shortly. 🙂

kjmartens commented 2 months ago

This should be resolved in Freeform 4.1.21 now. 🙂