craft-linkfield icon indicating copy to clipboard operation
craft-linkfield copied to clipboard

Trying to update to Craft 4 but getting issues with LinkField

Open mateostabio opened this issue 2 years ago • 28 comments

Hello, I just completed all the steps to update to Craft 4, and as I completed I tried to run nitro craft migrate/all But these are the errors I am getting. I have a feeling this is an issue regarding Linkfields inside of a SuperTable field.

*** applying m190417_202153_migrateDataToTable > update in {{%fields}} ... done (time: 0.002s) > update in {{%fields}} ... done (time: 0.001s) > update in {{%fields}} ... done (time: 0.000s) > update in {{%fields}} ... done (time: 0.000s) > update in {{%fields}} ... done (time: 0.000s) > update in {{%fields}} ... done (time: 0.001s) > update in {{%fields}} ... done (time: 0.000s) > update in {{%fields}} ... done (time: 0.000s) > update in {{%fields}} ... done (time: 0.000s) > update in {{%fields}} ... done (time: 0.000s) > update in {{%fields}} ... done (time: 0.001s) > update in {{%fields}} ... done (time: 0.000s) > update in {{%fields}} ... done (time: 0.001s) > update in {{%fields}} ... done (time: 0.001s) > update in {{%fields}} ... done (time: 0.001s) > update in {{%fields}} ... done (time: 0.001s) > update in {{%fields}} ... done (time: 0.000s) > update in {{%fields}} ... done (time: 0.001s) > update in {{%fields}} ... done (time: 0.001s) > update in {{%fields}} ... done (time: 0.001s) > update in {{%fields}} ... done (time: 0.000s) > update in {{%fields}} ... done (time: 0.000s) > update in {{%fields}} ... done (time: 0.001s) > update in {{%fields}} ... done (time: 0.000s) > update in {{%fields}} ... done (time: 0.000s) > update in {{%fields}} ... done (time: 0.001s) > update in {{%fields}} ... done (time: 0.001s) > update in {{%fields}} ... done (time: 0.000s) > update in {{%fields}} ... done (time: 0.001s) > update in {{%fields}} ... done (time: 0.000s) > update in {{%fields}} ... done (time: 0.001s) > update in {{%fields}} ... done (time: 0.000s) > update in {{%fields}} ... done (time: 0.000s) > update in {{%fields}} ... done (time: 0.000s) > update in {{%fields}} ... done (time: 0.000s) Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_cta' in 'field list' The SQL being executed was: SELECT elementId, siteId, field_cta FROM stc_businesssoftwarebox (/app/vendor/yiisoft/yii2/db/Schema.php:676) #0 /app/vendor/yiisoft/yii2/db/Command.php(1307): yii\db\Schema->convertException(Object(PDOException), 'SELECT element...') #1 /app/vendor/yiisoft/yii2/db/Command.php(1168): yii\db\Command->internalExecute('SELECT element...') #2 /app/vendor/yiisoft/yii2/db/Command.php(410): yii\db\Command->queryInternal('fetchAll', NULL) #3 /app/vendor/yiisoft/yii2/db/Query.php(249): yii\db\Command->queryAll() #4 /app/vendor/craftcms/cms/src/db/Query.php(153): yii\db\Query->all(NULL) #5 /app/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(138): craft\db\Query->all() #6 /app/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(91): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->updateLinkField(Object(lenz\linkfield\fields\LinkField), '{{%stc_business...', '') #7 /app/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(224): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->updateField(Object(lenz\linkfield\fields\LinkField), '{{%stc_business...') #8 /app/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(95): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->updateSuperTable(Object(verbb\supertable\fields\SuperTableField)) #9 /app/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(55): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->updateField(Object(verbb\supertable\fields\SuperTableField), '{{%content}}') #10 /app/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(31): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->updateAllFields() #11 /app/vendor/craftcms/cms/src/db/Migration.php(49): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->safeUp() #12 /app/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(758): craft\db\Migration->up() #13 /app/vendor/craftcms/cms/src/console/controllers/MigrateController.php(360): yii\console\controllers\BaseMigrateController->migrateUp('m190417_202153_...') #14 [internal function]: craft\console\controllers\MigrateController->actionAll() #15 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array) #16 /app/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array) #17 /app/vendor/yiisoft/yii2/console/Controller.php(182): yii\base\Controller->runAction('all', Array) #18 /app/vendor/yiisoft/yii2/base/Module.php(552): yii\console\Controller->runAction('all', Array) #19 /app/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('migrate/all', Array) #20 /app/vendor/craftcms/cms/src/console/Application.php(90): yii\console\Application->runAction('migrate/all', Array) #21 /app/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('migrate/all', Array) #22 /app/vendor/craftcms/cms/src/console/Application.php(121): yii\console\Application->handleRequest(Object(craft\console\Request)) #23 /app/vendor/yiisoft/yii2/base/Application.php(384): craft\console\Application->handleRequest(Object(craft\console\Request)) #24 /app/craft(22): yii\base\Application->run() #25 {main} *** failed to apply m190417_202153_migrateDataToTable (time: 0.241s)

0 from 1 migrations were applied.

Migration failed. The rest of the migrations are canceled. Error: exit status 1

mateostabio avatar Jun 22 '22 14:06 mateostabio

I reverted back to a working version with Craft cms 3.7, and tried to update again and migrate the DB again, but with different results. I have checked a few of these fields and they are not inside a supertable field. They are simply a Link field, some entries have a link on them, some leave it blank. Not sure what to do from here.

  > update in {{%fields}} ... done (time: 0.000s)
  > update in {{%fields}} ... done (time: 0.000s)
  > update in {{%fields}} ... done (time: 0.000s)
  > update in {{%fields}} ... done (time: 0.001s)
  > update in {{%fields}} ... done (time: 0.000s)
  > update in {{%fields}} ... done (time: 0.000s)
  > update in {{%fields}} ... done (time: 0.000s)
  > update in {{%fields}} ... done (time: 0.001s)
  > update in {{%fields}} ... done (time: 0.000s)
  > update in {{%fields}} ... done (time: 0.001s)
  > update in {{%fields}} ... done (time: 0.000s)
  > update in {{%fields}} ... done (time: 0.000s)
  > update in {{%fields}} ... done (time: 0.000s)
  > update in {{%fields}} ... done (time: 0.000s)
  > update in {{%fields}} ... done (time: 0.000s)
  > update in {{%fields}} ... done (time: 0.000s)
  > update in {{%fields}} ... done (time: 0.000s)
  > update in {{%fields}} ... done (time: 0.000s)
  > update in {{%fields}} ... done (time: 0.000s)
  > update in {{%fields}} ... done (time: 0.001s)
  > update in {{%fields}} ... done (time: 0.000s)
  > update in {{%fields}} ... done (time: 0.000s)
  > insert into {{%lenz_linkfield}} ...Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '2-1-477' for key 'idx_klokcnazwtszzpxqetwqewgpdtjrtcwbcvxd'

The SQL being executed was: INSERT INTO lenz_linkfield (elementId, siteId, fieldId, linkedId, linkedSiteId, type, linkedUrl, payload, dateCreated, dateUpdated, uid) VALUES (2, 1, 477, NULL, NULL, 'url', 'https://amilia.recruitee.com/', '{"ariaLabel":null,"customQuery":null,"customText":"View Open Positions","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '7721a737-d959-4ca3-be43-a4489756b9f6'), (2, 2, 477, NULL, NULL, 'url', 'https://amilia.recruitee.com/l/fr/', '{"ariaLabel":null,"customQuery":null,"customText":"Voir nos postes ouverts","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '758e60bc-1c67-4285-9fa5-c5b9b28ee891'), (1572, 1, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'ac2553c3-2ea7-404e-9326-ebcb94a2c829'), (1572, 2, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '58c91c48-7bfd-4e6d-a09b-7705073307a3'), (1584, 1, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'a71373de-e8d3-48d5-af8b-999cdd364702'), (1584, 2, 477, NULL, NULL, NULL, '', '{"ariaLabel":null,"customQuery":null,"customText":null,"target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '41a3b571-965a-433b-917b-b4ab188ce2f1'), (3759, 1, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '4426268a-2e5c-4b0a-ba1f-4a27e6a498b6'), (50771, 1, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'ff4c3cf3-0e57-4049-a315-c3e8ec9b22ac'), (50882, 1, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '90095a0e-aecb-4c5b-81aa-02ded2715c3d'), (50882, 2, 477, NULL, NULL, NULL, '', '{"ariaLabel":null,"customQuery":null,"customText":null,"target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '8bc3ada1-56b5-47a6-9dbe-794a6f3a0028'), (50883, 1, 477, NULL, NULL, NULL, '', '{"ariaLabel":null,"customQuery":null,"customText":null,"target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'c99211f4-339a-457e-be63-20f67690fcb3'), (50883, 2, 477, NULL, NULL, NULL, '', '{"ariaLabel":null,"customQuery":null,"customText":null,"target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'c0967a4d-2f6a-4897-9dab-50aad2cdefb3'), (50884, 1, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'a99dc990-9f3b-4c9d-885a-17070f68e04a'), (50884, 2, 477, NULL, NULL, NULL, '', '{"ariaLabel":null,"customQuery":null,"customText":null,"target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '46020efd-df5e-4991-a885-e773447fe5fa'), (51006, 1, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'fb0e4b1e-2bcb-48b6-aea9-bec9297a07fc'), (51006, 2, 477, NULL, NULL, NULL, '', '{"ariaLabel":null,"customQuery":null,"customText":null,"target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '58381390-bec9-4f72-9c1a-3c57a8b597eb'), (51113, 1, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '4f22502d-a648-4e6c-ab1a-a938944addcc'), (51113, 2, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '153ae2d8-7928-4756-a0d3-4adf3c887630'), (51114, 1, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '0500f2ce-3d6f-45e6-8670-139acf804068'), (51114, 2, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '33b667cc-b479-4789-9ea3-797851e1b717'), (51116, 1, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'acd67daa-2040-4755-a391-70708b94b175'), (51116, 2, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '53aff6d1-fc8f-4e74-a44c-bb2e75e7815e'), (51123, 1, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs/52990?subCategoryIds=2712644', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '64b57f45-bf35-4a9f-8328-8b4c8d05f8a6'), (51123, 2, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/fr/a-vos-masques-pret-courrez/shop/programs/52990?subCategoryIds=2712644', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'e2bbb325-91de-4265-90ad-4f9b34e02e7b'), (51479, 2, 477, NULL, NULL, 'url', 'https://avosmasques.quebec', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '991f0b83-4465-4eea-826f-20f2e0f55d62'), (51479, 1, 477, NULL, NULL, 'url', 'http://avosmasques.quebec/', '{"ariaLabel":null,"customQuery":null,"customText":"Sign me up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '93fc3675-405a-4dcd-b7a1-0bd71beaf930'), (51997, 1, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '627988aa-44ee-423d-af20-11a47a4fd591'), (51997, 2, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '4d8e203d-5daa-464e-a15a-e44122699336'), (51998, 1, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '4d959b5f-5ee3-42d8-99b0-f4a9ba4f3c4a'), (51998, 2, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '8ab76d92-5482-4ae7-89ac-7cd78ff1f23a'), (51999, 1, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '10550816-ac2c-48ba-8c7d-2d5dadc3f11f'), (51999, 2, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'bec0031d-d9f1-457c-b5ef-64f2f15652ec'), (52000, 1, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '6c2e361d-b5fd-451b-8f9a-05d3cbeca7c1'), (52000, 2, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '0434cd2f-4bf4-4399-9ade-78a7737fd266'), (52003, 1, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '1d5a4037-61e4-4d97-9662-ec96ed5e0071'), (52003, 2, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '276e1ccc-5112-48db-b3d4-da7743cabe3c'), (52339, 1, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'e2a05064-3214-4daa-9b65-a5ae21d68746'), (52339, 2, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '0e4f0680-4ce4-4cf0-a818-b6be57145d4a'), (52341, 1, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'a3cab277-cc3f-49ed-b42f-e60c045d66c2'), (52341, 2, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '4f56986e-cf7c-4ba7-8ca8-7aef953b6d97'), (52343, 1, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'e07fcfa4-90dc-4f2d-b553-b11fa6e3919d'), (52343, 2, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '98411eab-b5e2-49d9-9b4c-2d2f5ea9734d'), (52344, 1, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'f9bc094f-149b-4fd1-882f-04596c9505ad'), (52344, 2, 477, NULL, NULL, 'url', '', '{"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'd20c6a80-b39d-49db-a770-b01502a12139'), (52379, 2, 477, NULL, NULL, 'url', 'https://avosmasques.quebec', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '6a1bf067-b097-4657-9e5c-b285f2189b6c'), (52379, 1, 477, NULL, NULL, 'url', 'http://avosmasques.quebec/', '{"ariaLabel":null,"customQuery":null,"customText":"Sign me up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '0ff94e89-6507-4376-af07-bcf025b57ea3'), (52396, 2, 477, NULL, NULL, 'url', 'https://avosmasques.quebec', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'd7d9cb4f-5b5e-4310-89f9-ead36f760c79'), (52396, 1, 477, NULL, NULL, 'url', 'http://avosmasques.quebec/', '{"ariaLabel":null,"customQuery":null,"customText":"Sign me up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'a513493e-832f-4b4d-90f2-6054d0bbf532'), (52402, 2, 477, NULL, NULL, 'url', 'https://avosmasques.quebec', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'd805be12-3445-4183-9dd0-3bb9405a6b4f'), (52402, 1, 477, NULL, NULL, 'url', 'http://avosmasques.quebec/', '{"ariaLabel":null,"customQuery":null,"customText":"Sign me up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '46b0ea43-2160-46a0-8934-d72f1892d91f'), (52419, 2, 477, NULL, NULL, 'url', 'https://avosmasques.quebec', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'c882c169-06b1-4ead-aa4f-caacb1e5fc57'), (52419, 1, 477, NULL, NULL, 'url', 'http://avosmasques.quebec/', '{"ariaLabel":null,"customQuery":null,"customText":"Sign me up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '950dd256-9933-44ac-b267-d658a1fd03a1'), (52478, 2, 477, NULL, NULL, 'url', 'https://avosmasques.quebec', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '1437b800-6c1d-4a41-9159-8d64d668fbb5'), (52478, 1, 477, NULL, NULL, 'url', 'http://avosmasques.quebec/', '{"ariaLabel":null,"customQuery":null,"customText":"Sign me up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'f8f2a8ed-7410-46b7-93eb-993a806db8a5'), (52484, 2, 477, NULL, NULL, 'url', 'https://avosmasques.quebec', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '1852c2f0-af2a-4325-aa1d-8dea74a34e9b'), (52484, 1, 477, NULL, NULL, 'url', 'http://avosmasques.quebec/', '{"ariaLabel":null,"customQuery":null,"customText":"Sign me up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'e5f620b2-d6b1-4342-8308-809ee0956436'), (53004, 2, 477, NULL, NULL, 'url', 'https://avosmasques.quebec', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '96ebb1e7-389b-444f-8009-4127f4244bbf'), (53004, 1, 477, NULL, NULL, 'url', 'http://avosmasques.quebec/', '{"ariaLabel":null,"customQuery":null,"customText":"Sign me up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '904a06e1-7386-4eca-a539-06dfc1daa61e'), (53731, 1, 477, NULL, NULL, 'url', 'http://avosmasques.quebec/', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '46e186f1-5cc2-4c93-8614-9009c4058ea0'), (53731, 2, 477, NULL, NULL, 'url', 'https://avosmasques.quebec', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'fb604bde-e8fc-4851-8be8-4b852ba66208'), (53737, 1, 477, NULL, NULL, 'url', 'http://avosmasques.quebec/', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '5118832a-7332-4b92-889d-6d98924e0114'), (53737, 2, 477, NULL, NULL, 'url', 'https://avosmasques.quebec', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '2cd68cf3-577c-4bb5-9255-f212ef52a8d5'), (54246, 2, 477, NULL, NULL, 'url', 'https://avosmasques.quebec', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'cf0b904c-470b-4d71-8ab1-40c87e36494e'), (54246, 1, 477, NULL, NULL, 'url', 'http://avosmasques.quebec/', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '7513488c-db41-4e69-9015-478376ebd323'), (54252, 1, 477, NULL, NULL, 'url', 'http://avosmasques.quebec/', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '12aab898-0e33-4f2b-87a6-8d462a5c2f25'), (54252, 2, 477, NULL, NULL, 'url', 'https://avosmasques.quebec', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'f6a58446-519c-41dc-9cca-b77a04844f3e'), (58134, 2, 477, NULL, NULL, 'url', 'https://avosmasques.quebec', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'a5bdac1c-1f87-4e9f-9c1f-c1660b3ef5c2'), (58134, 1, 477, NULL, NULL, 'url', 'http://avosmasques.quebec/', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'd1724663-6793-41df-aef2-6e817064f5fd'), (58266, 2, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'be01a847-677a-40d0-82b7-35d982b37a4c'), (58266, 1, 477, NULL, NULL, 'url', 'http://avosmasques.quebec/', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '8bf52b45-43b1-4cbd-835e-60bd4f26c454'), (58272, 2, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '01305679-70d4-45ec-a3b1-b2e0e1f24e7f'), (58272, 1, 477, NULL, NULL, 'url', 'http://avosmasques.quebec/', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'a76ffc4d-8ee4-406c-bb61-7a2a25a77a0d'), (58278, 1, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '48108c69-7c36-4bfa-96d9-ac93b5668c71'), (58278, 2, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '15fc0ef6-30b0-42ff-93dc-27c0183a1ac5'), (58284, 1, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '9e0bced6-fdae-49fb-8b63-7787c6b14274'), (58284, 2, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '840302c7-3e5d-444b-8098-bc356d470b1d'), (58290, 2, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'e9f78973-ef94-41a7-b7c2-b9c2edee4a8f'), (58290, 1, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '3fa6759a-237d-4702-9cda-5947ed27581f'), (58296, 2, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'dc2e3398-2bcf-40a1-9a9d-ff6184dd0c1f'), (58296, 1, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'c7bd443e-515d-4015-8344-e93b27c880cd'), (58313, 1, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '18da95a2-b1b7-4855-8bc5-56bccf8058a2'), (58313, 2, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'c2daf57a-000e-42e1-800d-0444f8b9ce0a'), (58330, 1, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '15d7703d-c646-42ea-849e-a2e5aa4655aa'), (58330, 2, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'd686768b-eb12-4ae5-a851-2e0fe463c9b3'), (58347, 2, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '1c3c72e0-163d-4fbb-9215-dfb919ae2884'), (58347, 1, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '964b697e-fbe2-4a16-b765-8e3bdf6ea9aa'), (58353, 2, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '2bb296b3-8839-4a7a-ac68-dfc0598620ac'), (58353, 1, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'c9bef391-2f82-473a-b6bf-798c5e9c05bf'), (58359, 1, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '6d43e128-a75a-4a46-8204-8c6f4a6758e5'), (58359, 2, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'df03296a-f812-46a8-8535-380ef1b2d0dd'), (58441, 2, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '89177b4c-1c07-45fd-9603-5d92891d6caf'), (58441, 1, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'b82701ee-bf52-47b6-bae7-1ff195373d9a'), (58447, 1, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'f1569c26-95f8-4a7e-a8a6-dd66e09f9561'), (58447, 2, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '2dc1131e-4b6d-4a88-b268-ea514b4a61d6'), (58453, 2, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '45f74484-0088-4fb9-ac4d-2911c015ad96'), (58453, 1, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '59d839a8-8905-4c4d-ba3b-5f1f0d47584e'), (58470, 2, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'fe466891-79e8-453d-ac48-16c279a5b72a'), (58470, 1, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'c7ebb3ff-3da5-4377-a797-948da64565c0'), (58487, 1, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'da0a1b71-3e99-4b32-970f-b8ee383e7164'), (58487, 2, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"M'inscrire","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', '00f21563-e840-4f92-b1a1-405d96c50832'), (58493, 1, 477, NULL, NULL, 'url', 'https://www.amilia.com/store/en/a-vos-masques-pret-courrez/shop/programs', '{"ariaLabel":null,"customQuery":null,"customText":"Sign Me Up!","target":null,"title":null}', '2022-06-23 13:15:30', '2022-06-23 13:15:30', 'deb78c89-a8da-4633-8c6e-0865609dd225') (/app/vendor/yiisoft/yii2/db/Schema.php:676) #0 /app/vendor/yiisoft/yii2/db/Command.php(1307): yii\db\Schema->convertException(Object(PDOException), 'INSERT INTO le...') #1 /app/vendor/yiisoft/yii2/db/Command.php(1102): yii\db\Command->internalExecute('INSERT INTO le...') #2 /app/vendor/yiisoft/yii2/db/Migration.php(246): yii\db\Command->execute() #3 /app/vendor/craftcms/cms/src/db/Migration.php(206): yii\db\Migration->batchInsert('{{%lenz_linkfie...', Array, Array) #4 /app/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(129): craft\db\Migration->batchInsert('{{%lenz_linkfie...', Array, Array) #5 /app/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(175): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->lenz\linkfield\migrations{closure}(Array) #6 /app/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(91): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->updateLinkField(Object(lenz\linkfield\fields\LinkField), '{{%content}}', '') #7 /app/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(55): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->updateField(Object(lenz\linkfield\fields\LinkField), '{{%content}}') #8 /app/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(31): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->updateAllFields() #9 /app/vendor/craftcms/cms/src/db/Migration.php(49): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->safeUp() #10 /app/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(758): craft\db\Migration->up() #11 /app/vendor/craftcms/cms/src/console/controllers/MigrateController.php(360): yii\console\controllers\BaseMigrateController->migrateUp('m190417_202153_...') #12 [internal function]: craft\console\controllers\MigrateController->actionAll() #13 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array) #14 /app/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array) #15 /app/vendor/yiisoft/yii2/console/Controller.php(182): yii\base\Controller->runAction('all', Array) #16 /app/vendor/yiisoft/yii2/base/Module.php(552): yii\console\Controller->runAction('all', Array) #17 /app/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('migrate/all', Array) #18 /app/vendor/craftcms/cms/src/console/Application.php(90): yii\console\Application->runAction('migrate/all', Array) #19 /app/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('migrate/all', Array) #20 /app/vendor/craftcms/cms/src/console/Application.php(121): yii\console\Application->handleRequest(Object(craft\console\Request)) #21 /app/vendor/yiisoft/yii2/base/Application.php(384): craft\console\Application->handleRequest(Object(craft\console\Request)) #22 /app/craft(22): yii\base\Application->run() #23 {main} *** failed to apply m190417_202153_migrateDataToTable (time: 0.347s)

25 from 26 migrations were applied.

Migration failed. The rest of the migrations are canceled. Error: exit status 1

mateostabio avatar Jun 23 '22 13:06 mateostabio

We're also getting this error during migrate/all when updating Craft from 3.7 to 4.0.

shep-cc avatar Jun 23 '22 13:06 shep-cc

+1, getting the exact same error.

remcoov avatar Jul 07 '22 07:07 remcoov

@mateostabio There was an error reported like this before and as far as I remember a fix has been created. Which version do you try to update to? Could you check your content table whether there is a column named 'field_cta' or wether it has some suffix?

I think the second error was triggered because the table lenz_linkfield from the first migration try still exists in your database, please remove it before you run the migration again.

sebastian-lenz avatar Jul 12 '22 20:07 sebastian-lenz

+1

I have Linkfields in Supertable fields.

Database Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_intro_canGoBack' in 'field list'
The SQL being executed was: SELECT elementId, siteId, field_intro_canGoBack
FROM matrixcontent_introelement_matrix

Migration: lenz\linkfield\migrations\m190417_202153_migrateDataToTable

Output:

> update in {{%fields}} ... done (time: 0.002s)
> update in {{%fields}} ... done (time: 0.000s)
> update in {{%fields}} ... done (time: 0.000s)
> update in {{%fields}} ... done (time: 0.000s)
> update in {{%fields}} ... done (time: 0.000s)
Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_intro_canGoBack' in 'field list'
The SQL being executed was: SELECT elementId, siteId, field_intro_canGoBack
FROM matrixcontent_introelement_matrix (/Users/goeldi/websites/mfsystem/vendor/yiisoft/yii2/db/Schema.php:676)
#0 /Users/goeldi/websites/mfsystem/vendor/yiisoft/yii2/db/Command.php(1307): yii\db\Schema->convertException(Object(PDOException), 'SELECT element...')
#1 /Users/goeldi/websites/mfsystem/vendor/yiisoft/yii2/db/Command.php(1168): yii\db\Command->internalExecute('SELECT element...')
#2 /Users/goeldi/websites/mfsystem/vendor/yiisoft/yii2/db/Command.php(410): yii\db\Command->queryInternal('fetchAll', NULL)
#3 /Users/goeldi/websites/mfsystem/vendor/yiisoft/yii2/db/Query.php(249): yii\db\Command->queryAll()
#4 /Users/goeldi/websites/mfsystem/vendor/craftcms/cms/src/db/Query.php(247): yii\db\Query->all(NULL)
#5 /Users/goeldi/websites/mfsystem/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(138): craft\db\Query->all()
#6 /Users/goeldi/websites/mfsystem/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(91): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->updateLinkField(Object(lenz\linkfield\fields\LinkField), '{{%matrixconten...', 'intro_')
#7 /Users/goeldi/websites/mfsystem/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(110): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->updateField(Object(lenz\linkfield\fields\LinkField), '{{%matrixconten...', 'intro_')
#8 /Users/goeldi/websites/mfsystem/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(93): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->updateMatrixField(Object(craft\fields\Matrix))
#9 /Users/goeldi/websites/mfsystem/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(55): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->updateField(Object(craft\fields\Matrix), '{{%content}}')
#10 /Users/goeldi/websites/mfsystem/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(31): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->updateAllFields()
#11 /Users/goeldi/websites/mfsystem/vendor/craftcms/cms/src/db/Migration.php(49): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->safeUp()
#12 /Users/goeldi/websites/mfsystem/vendor/craftcms/cms/src/db/MigrationManager.php(233): craft\db\Migration->up(true)
#13 /Users/goeldi/websites/mfsystem/vendor/craftcms/cms/src/db/MigrationManager.php(149): craft\db\MigrationManager->migrateUp(Object(lenz\linkfield\migrations\m190417_202153_migrateDataToTable))
#14 /Users/goeldi/websites/mfsystem/vendor/craftcms/cms/src/services/Updates.php(252): craft\db\MigrationManager->up()
#15 /Users/goeldi/websites/mfsystem/vendor/craftcms/cms/src/controllers/BaseUpdaterController.php(493): craft\services\Updates->runMigrations(Array)
#16 /Users/goeldi/websites/mfsystem/vendor/craftcms/cms/src/controllers/UpdaterController.php(203): craft\controllers\BaseUpdaterController->runMigrations(Array, 'restore-db')
#17 [internal function]: craft\controllers\UpdaterController->actionMigrate()
#18 /Users/goeldi/websites/mfsystem/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#19 /Users/goeldi/websites/mfsystem/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#20 /Users/goeldi/websites/mfsystem/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('migrate', Array)
#21 /Users/goeldi/websites/mfsystem/vendor/craftcms/cms/src/web/Application.php(301): yii\base\Module->runAction('updater/migrate', Array)
#22 /Users/goeldi/websites/mfsystem/vendor/craftcms/cms/src/web/Application.php(712): craft\web\Application->runAction('updater/migrate')
#23 /Users/goeldi/websites/mfsystem/vendor/craftcms/cms/src/web/Application.php(258): craft\web\Application->_processUpdateLogic(Object(craft\web\Request))
#24 /Users/goeldi/websites/mfsystem/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))
#25 /Users/goeldi/websites/mfsystem/web/index.php(22): yii\base\Application->run()
#26 {main}

idleog avatar Aug 05 '22 14:08 idleog

+1 here.

In doing some digging if it helps, we been able to recreate the following a few times.

When we we run the migration the first time after running composer update which includes Craft 4.2.1.1 and "sebastianlenz/linkfield": "2.1.3-rc". We consistently get : Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (craftclean5.lenz_linkfield, CONSTRAINT fk_oqeiyekdlcdmupvzwqiwicomrpgckeqnkxli FOREIGN KEY (elementId) REFERENCES elements (id) ON DELETE CASCADE) The SQL being executed was: INSERT INTO lenz_linkfield (elementId, siteId, fieldId, linkedId, linkedSiteId, type, linkedUrl, payload, dateCreated, dateUpdated, uid) VALUES (4799191, 1, 2956, NULL, NULL, 'url',...

and that kills the migration.

If we try to run it again we get a different error

Column not found: 1054 Unknown column 'field_backgroundBanner_cta_yidoliyu' in 'field list'

The "Link Field" mentioned here is inside of a matrix block.

If we look back at the output from the first attempt at migration we see

drop column field_backgroundBanner_cta_yidoliyu from table {{%matrixcontent_landingpage}} ... done (time: 0.100s)

So the second error makes sense since the column was removed in the first migration attempt before it errored.

Thanks!

masonry47 avatar Aug 11 '22 19:08 masonry47

+1

umkasanki avatar Aug 16 '22 16:08 umkasanki

There are at least two separate issues here.

Column not found: 1054 Unknown column 'field_backgroundBanner_cta_yidoliyu' in 'field list'

No idea, but I suspect those are results of failed updates (for whatever reason) and the database/project config files weren't reverted to their pre-update attempt states before another update was attempted.

Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails

The root cause is there are orphaned rows in the respective content tables (matrix, super table, etc.) that don't have a matching element id in the elements table.

There is a PR here that should resolve it: https://github.com/sebastian-lenz/craft-linkfield/pull/235

This doesn't clean up the orphaned rows but does ensure that the migration is only working with valid data.

angrybrad avatar Aug 16 '22 22:08 angrybrad

Hi @sebastian-lenz ! Any update on this bug?

mateostabio avatar Aug 22 '22 17:08 mateostabio

I've released version 2.1.4 which contains the fix supplied by angrybrad.

sebastian-lenz avatar Aug 23 '22 08:08 sebastian-lenz

I've tried to update it again using a new DB from the live site, but with no luck. Screen Shot 2022-08-23 at 12 39 01 PM

So I reverted everything back to the live DB again, I reverted all versions in composer.json to Craft CMS v3.7.52 with all previous version plugins. I got the old site working again.

I then tried something different:

  • I deleted the field 'businesssoftwarebox' (it was a super table field with a link field in it I wasn't using anymore.)
  • I ran php craft gc
  • I updated again, but this time I put Craft CMS ^4.2.0 in composer file
  • I ran migrate/all
  • Still getting issue below.
nitro php craft migrate/all                                                
connecting to amilia.nitro
Checking for pending migrations ...
Total 22 new Craft migrations to be applied:
    - m210121_145800_asset_indexing_changes
    - m210624_222934_drop_deprecated_tables
    - m210724_180756_rename_source_cols
    - `m210809_124211_remove_superfluous_uids`
    - m210817_014201_universal_users
    - m210904_132612_store_element_source_settings_in_project_config
    - m211115_135500_image_transformers
    - m211201_131000_filesystems
    - m220103_043103_tab_conditions
    - m220104_003433_asset_alt_text
    - m220123_213619_update_permissions
    - m220126_003432_addresses
    - m220213_015220_matrixblocks_owners_table
    - m220222_122159_full_names
    - m220223_180559_nullable_address_owner
    - m220225_165000_transform_filesystems
    - m220309_152006_rename_field_layout_elements
    - m220314_211928_field_layout_element_uids
    - m220316_123800_transform_fs_subpath
    - m220317_174250_release_all_jobs
    - m220330_150000_add_site_gql_schema_components
    - m220413_024536_site_enabled_string

Total 1 new Amazon S3 migration to be applied:
    - m220119_204627_update_fs_configs

Total 2 new Super Table migrations to be applied:
    - m220308_000000_remove_superfluous_uids
    - m220308_100000_owners_table

Total 1 new Typed link field migration to be applied:
    - m190417_202153_migrateDataToTable

Apply the above migrations? (yes|no) [no]:yes     
Create database backup? (yes|no) [no]:yes
Backing up the database ... done
*** applying m210121_145800_asset_indexing_changes
    > truncate table {{%assetindexdata}} ... done (time: 0.022s)
    > drop column sessionId from table {{%assetindexdata}} ... done (time: 0.020s)
    > add column sessionId integer NOT NULL AFTER `id` to table {{%assetindexdata}} ... done (time: 0.007s)
    > add column isDir boolean DEFAULT FALSE AFTER `timestamp` to table {{%assetindexdata}} ... done (time: 0.005s)
    > add column isSkipped boolean DEFAULT FALSE AFTER `recordId` to table {{%assetindexdata}} ... done (time: 0.003s)
    > dropping {{%assetindexingsessions}} if it exists ... done (time: 0.005s)
    > create table {{%assetindexingsessions}} ... done (time: 0.017s)
    > add foreign key fk_vdphptvhvhzdgrqkukmysojqjqdhxpsdkgjj: {{%assetindexdata}} (sessionId) references {{%assetindexingsessions}} (id) ... done (time: 0.028s)
*** applied m210121_145800_asset_indexing_changes (time: 0.149s)

*** applying m210624_222934_drop_deprecated_tables
    > dropping {{%entrydrafterrors}} if it exists ... done (time: 0.009s)
    > dropping {{%entryversionerrors}} if it exists ... done (time: 0.013s)
    > dropping {{%entrydrafts}} if it exists ... done (time: 0.004s)
    > dropping {{%entryversions}} if it exists ... done (time: 0.003s)
    > dropping {{%projectconfignames}} if it exists ... done (time: 0.001s)
    > dropping {{%templatecacheelements}} if it exists ... done (time: 0.004s)
    > dropping {{%templatecachequeries}} if it exists ... done (time: 0.008s)
    > dropping {{%templatecachecriteria}} if it exists ... done (time: 0.001s)
    > dropping {{%templatecaches}} if it exists ... done (time: 0.010s)
*** applied m210624_222934_drop_deprecated_tables (time: 0.064s)

*** applying m210724_180756_rename_source_cols
    > rename column sourceId in table {{%drafts}} to canonicalId ... done (time: 0.007s)
    > rename column sourceId in table {{%revisions}} to canonicalId ... done (time: 0.011s)
*** applied m210724_180756_rename_source_cols (time: 0.025s)

*** applying m210809_124211_remove_superfluous_uids
    > dropping index on {{%users}} if it exists ... done (time: 0.011s)
    > drop column uid from table {{%assets}} ... done (time: 0.007s)
    > drop column uid from table {{%categories}} ... done (time: 0.004s)
    > drop column uid from table {{%entries}} ... done (time: 0.004s)
    > drop column uid from table {{%matrixblocks}} ... done (time: 0.004s)
    > drop column uid from table {{%tags}} ... done (time: 0.003s)
    > drop column uid from table {{%users}} ... done (time: 0.003s)
*** applied m210809_124211_remove_superfluous_uids (time: 0.042s)

*** applying m210817_014201_universal_users
    > alter column username in table {{%users}} to string ... done (time: 0.048s)
    > alter column email in table {{%users}} to string ... done (time: 0.023s)
    > alter column firstName in table {{%users}} to string ... done (time: 0.003s)
    > alter column lastName in table {{%users}} to string ... done (time: 0.003s)
    > add column active boolean NOT NULL DEFAULT FALSE AFTER `admin` to table {{%users}} ... done (time: 0.003s)
    > create index idx_bqairrmgugsrywkzejokvpkswtzkmnvxlsgb on {{%users}} (active) ... done (time: 0.017s)
    > create index idx_fyuzkgvpdcwjdsprpbhrwhhgjrfrqaekvvzt on {{%users}} (locked) ... done (time: 0.016s)
    > create index idx_bnzdntphfozkgcixgvhtoveugelobigcfygv on {{%users}} (pending) ... done (time: 0.011s)
    > create index idx_wsvvldlzmruflwkfmzbqfsccwuzcmnwiztty on {{%users}} (suspended) ... done (time: 0.011s)
    > update in {{%users}} ... done (time: 0.008s)
    > update in {{%users}} ... done (time: 0.006s)
*** applied m210817_014201_universal_users (time: 3.084s)

*** applying m210904_132612_store_element_source_settings_in_project_config
    > drop table {{%elementindexsettings}} ... done (time: 0.005s)
*** applied m210904_132612_store_element_source_settings_in_project_config (time: 0.010s)

*** applying m211115_135500_image_transformers
    > dropping {{%imagetransformindex}} if it exists ... done (time: 0.006s)
    > dropping {{%imagetransforms}} if it exists ... done (time: 0.007s)
    > rename table {{%assettransforms}} to {{%imagetransforms}} ... done (time: 0.003s)
    > rename table {{%assettransformindex}} to {{%imagetransformindex}} ... done (time: 0.002s)
    > dropping index on {{%imagetransformindex}} if it exists ... done (time: 0.008s)
    > drop column volumeId from table {{%imagetransformindex}} ... done (time: 0.004s)
    > create index idx_ovwjouabumzsrjfzuqwflxhxjaotkqohxope on {{%imagetransformindex}} (assetId,location) ... done (time: 0.006s)
    > add column transformer string NULL DEFAULT NULL AFTER `assetId` to table {{%imagetransformindex}} ... done (time: 0.003s)
    > rename column location in table {{%imagetransformindex}} to transformString ... done (time: 0.004s)
    > rename column dimensionChangeTime in table {{%imagetransforms}} to parameterChangeTime ... done (time: 0.005s)
*** applied m211115_135500_image_transformers (time: 0.053s)

*** applying m211201_131000_filesystems
    > add column fs string AFTER `type` to table {{%volumes}} ... done (time: 0.010s)
    > update in {{%volumes}} ... done (time: 0.009s)
    > alter column fs in table {{%volumes}} to string NOT NULL ... done (time: 0.022s)
    > drop column settings from table {{%volumes}} ... done (time: 0.004s)
    > drop column type from table {{%volumes}} ... done (time: 0.009s)
    > drop column hasUrls from table {{%volumes}} ... done (time: 0.004s)
    > drop column url from table {{%volumes}} ... done (time: 0.003s)
*** applied m211201_131000_filesystems (time: 0.072s)

*** applying m220103_043103_tab_conditions
    > add column settings text AFTER `name` to table {{%fieldlayouttabs}} ... done (time: 0.006s)
*** applied m220103_043103_tab_conditions (time: 0.012s)

*** applying m220104_003433_asset_alt_text
    > add column alt text AFTER `kind` to table {{%assets}} ... done (time: 0.007s)
*** applied m220104_003433_asset_alt_text (time: 0.014s)

*** applying m220123_213619_update_permissions
    > insert into {{%userpermissions}} ... done (time: 0.002s)
    > insert into {{%userpermissions_users}} ... done (time: 0.003s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.002s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.003s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.040s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.003s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.002s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.004s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.002s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.002s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.001s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.002s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.001s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > insert into {{%userpermissions}} ... done (time: 0.000s)
    > insert into {{%userpermissions_users}} ... done (time: 0.000s)
    > delete from {{%userpermissions}} ... done (time: 0.009s)
*** applied m220123_213619_update_permissions (time: 0.400s)

*** applying m220126_003432_addresses
    > dropping {{%addresses}} if it exists ... done (time: 0.006s)
    > create table {{%addresses}} ... done (time: 0.009s)
    > add foreign key fk_cgomgbxasqavbusoeevgrriwcgwevbqghwsg: {{%addresses}} (id) references {{%elements}} (id) ... done (time: 0.018s)
    > add foreign key fk_guqzwayrtrrqvsgyacflznpyhcdomqvcstju: {{%addresses}} (ownerId) references {{%elements}} (id) ... done (time: 0.016s)
*** applied m220126_003432_addresses (time: 0.054s)

*** applying m220213_015220_matrixblocks_owners_table
    > dropping {{%matrixblocks_owners}} if it exists ... done (time: 0.008s)
    > create table {{%matrixblocks_owners}} ... done (time: 0.009s)
    > add foreign key fk_eegbvtxoyzzeeezjwepjczoqmrbbdejxnmce: {{%matrixblocks_owners}} (blockId) references {{%matrixblocks}} (id) ... done (time: 0.018s)
    > add foreign key fk_dxkifrehculzgfomqbgbeguyfebrsrvzevzk: {{%matrixblocks_owners}} (ownerId) references {{%elements}} (id) ... done (time: 0.016s)
    > execute SQL: INSERT INTO {{%matrixblocks_owners}} ([[blockId]], [[ownerId]], [[sortOrder]]) 
SELECT [[id]], [[ownerId]], [[sortOrder]] 
FROM {{%matrixblocks}} ... done (time: 0.179s)
    > dropping index on {{%matrixblocks}} if it exists ... done (time: 0.010s)
    > drop column sortOrder from table {{%matrixblocks}} ... done (time: 0.005s)
    > rename column ownerId in table {{%matrixblocks}} to primaryOwnerId ... done (time: 0.005s)
*** applied m220213_015220_matrixblocks_owners_table (time: 0.255s)

*** applying m220222_122159_full_names
    > add column fullName string AFTER `username` to table {{%users}} ... done (time: 0.005s)
    > update in {{%users}} ... done (time: 0.007s)
*** applied m220222_122159_full_names (time: 0.019s)

*** applying m220223_180559_nullable_address_owner
    > alter column ownerId in table {{%addresses}} to integer ... done (time: 0.021s)
*** applied m220223_180559_nullable_address_owner (time: 0.027s)

*** applying m220225_165000_transform_filesystems
    > add column transformFs string AFTER `fs` to table {{%volumes}} ... done (time: 0.005s)
*** applied m220225_165000_transform_filesystems (time: 0.010s)

*** applying m220309_152006_rename_field_layout_elements
*** applied m220309_152006_rename_field_layout_elements (time: 0.007s)

*** applying m220314_211928_field_layout_element_uids
    > update in {{%fieldlayouttabs}} ... done (time: 0.002s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.003s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.003s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.002s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.002s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.002s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.002s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.001s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
    > update in {{%fieldlayouttabs}} ... done (time: 0.000s)
*** applied m220314_211928_field_layout_element_uids (time: 0.093s)

*** applying m220316_123800_transform_fs_subpath
    > add column transformSubpath string AFTER `transformFs` to table {{%volumes}} ... done (time: 0.005s)
*** applied m220316_123800_transform_fs_subpath (time: 0.011s)

*** applying m220317_174250_release_all_jobs
*** applied m220317_174250_release_all_jobs (time: 0.022s)

*** applying m220330_150000_add_site_gql_schema_components
*** applied m220330_150000_add_site_gql_schema_components (time: 0.006s)

*** applying m220413_024536_site_enabled_string
    > alter column enabled in table {{%sites}} to string NOT NULL DEFAULT 'true' ... done (time: 0.023s)
*** applied m220413_024536_site_enabled_string (time: 0.029s)

*** applying m220119_204627_update_fs_configs
*** applied m220119_204627_update_fs_configs (time: 0.017s)

*** applying m220308_000000_remove_superfluous_uids
    > drop column uid from table {{%supertableblocks}} ... done (time: 0.008s)
*** applied m220308_000000_remove_superfluous_uids (time: 0.020s)

*** applying m220308_100000_owners_table
    > dropping {{%supertableblocks_owners}} if it exists ... done (time: 0.007s)
    > create table {{%supertableblocks_owners}} ... done (time: 0.026s)
    > add foreign key fk_agoudrzeplntdvzozoqvcdmvjlznaixdnrva: {{%supertableblocks_owners}} (blockId) references {{%supertableblocks}} (id) ... done (time: 0.025s)
    > add foreign key fk_wucnydfkespmerbzwugevhymuugttgerrhqe: {{%supertableblocks_owners}} (ownerId) references {{%elements}} (id) ... done (time: 0.016s)
    > update in {{%supertableblocks}} ... done (time: 0.003s)
    > execute SQL: INSERT INTO {{%supertableblocks_owners}} ([[blockId]], [[ownerId]], [[sortOrder]]) 
SELECT [[id]], [[ownerId]], [[sortOrder]] 
FROM {{%supertableblocks}} ... done (time: 0.039s)
    > dropping index on {{%supertableblocks}} if it exists ... done (time: 0.002s)
    > drop column sortOrder from table {{%supertableblocks}} ... done (time: 0.004s)
    > rename column ownerId in table {{%supertableblocks}} to primaryOwnerId ... done (time: 0.004s)
*** applied m220308_100000_owners_table (time: 0.133s)

*** applying m190417_202153_migrateDataToTable
    > update in {{%fields}} ... done (time: 0.003s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.001s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.001s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.001s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.001s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.001s)
    > insert into {{%lenz_linkfield}} ...Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '2-1-477' for key 'idx_klokcnazwtszzpxqetwqewgpdtjrtcwbcvxd'
The SQL being executed was: INSERT INTO `lenz_linkfield` (`elementId`, `siteId`, `fieldId`, `linkedId`, `linkedSiteId`, `type`, `linkedUrl`, `payload`, `dateCreated`, `dateUpdated`, `uid`) VALUES (2, 1, 477, NULL, NULL, 'url', 'https://amilia.recruitee.com/', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"View Open Positions\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'abfb94d1-5323-4265-b053-9a951cd5f578'), (6, 1, 477, NULL, NULL, 'entry', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '9b24db70-3124-4fbc-98fc-87c1d304aad1'), (6, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '8a0aa528-1b66-407d-ac1e-575fe5d9fe2a'), (2, 2, 477, NULL, NULL, 'url', 'https://amilia.recruitee.com/l/fr/', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"Voir nos postes ouverts\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '14d1b4df-a65d-4143-b8d3-fab1445692c0'), (1572, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '104e3e9d-6a55-4a2f-90dc-8c7cfbebf69d'), (1572, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '710dcce8-4e1e-4864-a4c5-8fcd1c75e8c1'), (1584, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '5fdc21ee-1427-432e-af54-61cfae53aaae'), (1584, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '474852be-5615-49b0-a103-6435f732ed98'), (3759, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '80cdddfc-9c9e-481c-a367-097d89000aa0'), (50771, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '3527917e-d5ae-421d-82ef-7dc95b04ac98'), (50882, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '7ecc76a5-3cfc-4dfa-a983-188d93915411'), (50882, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '58bc3567-c583-4aea-a938-f1862d259e08'), (50883, 1, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '1227396e-23cf-426e-9385-b75f75c1e7f3'), (50883, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'a61c548b-9a0d-48d0-a34f-086277f53a01'), (50884, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '43df3db9-5210-4c83-b679-2d32434ab9af'), (50884, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'b855fd6f-7250-4853-b9e8-f4ff08be491c'), (51006, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '181e2afa-e9d3-401c-ac18-b6456097c0ef'), (51006, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '25874175-939d-48d4-9775-23e5162545ed'), (51113, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '83338173-c7bc-40a5-8827-c00b63526926'), (51113, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '6d4e0ffc-5383-4ead-b48c-6c6ee590af66'), (51114, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '8d35d319-3bf9-44c9-ab1f-977d32e89081'), (51114, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '5b5c7bd8-99a7-4b7e-b5e8-58037313a413'), (51116, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '5a9cd55c-d510-490b-8333-9becc83e72dd'), (51116, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '9b8918a0-c1ec-4808-84d6-1984570c0b12'), (51997, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'cdbd12d5-1df1-4e93-91af-4c4c0250bbe4'), (51997, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'a3a7caa3-1a55-4313-8aa7-bb05a1ab15dd'), (51998, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '7932160f-153a-4e2b-8a87-f246a4b02cd1'), (51998, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '0760555b-37d6-4ab4-bac7-4f8d96fc883b'), (51999, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '1a648f8e-6589-45fb-ac09-27aae1958830'), (51999, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'b422ae99-c67c-4e2e-b408-85fc1fb9fb2d'), (52000, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '92f095de-a63a-4fad-85e9-f2eb43ede372'), (52000, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '81c3e279-6c19-4c15-9835-45581ff2954b'), (52003, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'aff205e2-44d1-4114-aab6-508268b0825a'), (52003, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '787352d9-eee5-4eeb-a243-e13011caceb5'), (52339, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'ecaf4f46-23cc-4925-aa80-096387444a09'), (52339, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '9b5000ca-558b-4979-82f6-1360e856c4b7'), (52341, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '2dc06a77-8b03-4a18-aef0-ef0b0a52d67c'), (52341, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'df043b65-6ea0-497a-957e-5eca00d9c8aa'), (52343, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '4ca133ba-ae45-4777-911a-4908ba230529'), (52343, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '7f4eee76-e3a1-4aff-a22c-9699b11ea917'), (52344, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '9b22cffc-5015-4a27-a9db-15f9ef7148fc'), (52344, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '3ab19fac-99c4-4797-97fc-3fcd31959dee'), (61114, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'b1bdb7fd-5b41-4847-8a27-9176c1570577'), (61114, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '50f6bbbd-a9f6-42c9-bc73-510119501c83'), (61119, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '904427e2-ea6f-4349-b316-ef1083afe911'), (61119, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '389bc3cf-488b-4a44-ada9-0c734c4b555f'), (61941, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '10d7047f-dfc1-4b3e-8dc0-36f8425c18fd'), (61941, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '952e5be9-4b12-43a4-8b9b-c94bae4499a2'), (61942, 1, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'f64b89b3-5fe3-46b5-aac7-83ee758ec6b2'), (61942, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'a79d8ee4-de54-4377-ae55-67f9971c5188'), (61943, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '32e63f72-2ba5-47a5-9836-7cbe250ec826'), (61943, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'c115d4a6-43bd-47ed-ac52-81c130426f55'), (61946, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '56fb8214-065a-457b-90c5-b16803f678d4'), (61946, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '307af99b-130b-4ae2-8e85-fbaf27138eed'), (61969, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'da909f39-ad01-4561-bdbe-cf5a01746818'), (61969, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '2da29ea6-05a6-40df-a33a-10cda94846a8'), (64196, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'd0121bde-7be0-4bee-918b-2a13f8af25f5'), (64196, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '6a509ed4-0ed1-43ce-b394-c528753daf86'), (64197, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '69ddd25b-0317-4255-ae2b-d070040d087b'), (64197, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '61d0d4e7-e3c1-4a2d-a2ed-6beded28cfa2'), (64199, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '1d94389d-2476-4346-9b99-fa5307420b7e'), (64199, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'd5efc6bf-94a8-4561-a207-aeb27f67a470'), (64200, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '6db3e684-8937-441f-9ad7-cf32199f33f8'), (64200, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '6c7c219a-89e9-4662-8db5-725de0ae61c6'), (64201, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '401f3238-a086-40ca-8fa0-36f3beae0ccc'), (64201, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '7387550d-0a51-4e9d-a026-dd3c1239e427'), (64202, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'ee484528-b018-4dda-a7ec-42e50e209e2d'), (64202, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '76fc7984-711b-4ba7-be98-561708f01877'), (64203, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '673f06eb-86d8-443d-b018-1d1b870353bb'), (64203, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'ac78b6ba-940e-4e70-bc6b-f2317e482c30'), (64204, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '5111a469-579e-401a-bfdf-6eb95593e8da'), (64204, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'e5af8cc6-f024-48f2-addf-332046488f82'), (64205, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '773f3711-7987-4e3c-86c3-c08649e390c2'), (64205, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'fd2ed86d-5d44-4e21-be0e-20f5f902842c'), (64318, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '76d13468-380b-4a9a-bf2e-fc8b930262f9'), (64318, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'e888f2ac-580a-407f-a69f-7f7114c033b7'), (66627, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '3c54500c-7a5d-4d7a-803a-3897516d9c71'), (66627, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '80ce3bfe-9389-45db-a6f2-89c71a005f6e'), (66628, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '99765efd-c6b3-4af6-944b-0cf29250ee53'), (66628, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'bef3a5e4-5b37-45c3-9aac-49f2862818d3'), (69641, 1, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '66589312-214c-460d-b7a7-cb243905bd46'), (69641, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '0df62bf6-93d4-4282-8416-42868eb6ade4'), (69642, 1, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '0fb77205-3491-4543-97bb-717246e12ecd'), (69642, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'b15b5554-acac-4b4a-b397-e318e8701370'), (69647, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '7ca4ddcd-1b1b-4ecf-af15-41a8b757f850'), (69647, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '91886984-c1f0-464f-ac44-3935891e9185'), (69648, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '6a44edb4-aea7-4b0e-8320-9046e0b16c52'), (69648, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '62406852-e614-410e-858c-d2926182c754'), (69649, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '607017d6-156c-4ef1-ac6c-b207e902adeb'), (69649, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '3e8519ed-ab7b-45fe-a911-222686673640'), (69650, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '273ced8d-8dbb-4077-8b95-d25957a9ad25'), (69650, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '421cc54a-de9f-4a4b-99fa-a89ce5fd01f5'), (69651, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '28ea5c59-6d78-4ede-8ff8-d4be5234cb33'), (69651, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'f1b49303-86aa-40c6-b980-c38cdd00b5b5'), (69652, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '8a4e0d4b-2567-44cd-85db-70e183b893fa'), (69652, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '19be674d-d8a1-494b-b776-6325cb5b2e14'), (69653, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '8f0805bd-661c-4591-9010-f2bb43b74359'), (69653, 2, 477, NULL, NULL, NULL, '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":null,\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', '75d7ff42-48a6-48f6-8d5c-85e0534e7706'), (70896, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'ca28811e-7df9-43a5-969b-590c6193a46d'), (70896, 2, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'd041886f-7b0e-4320-9424-cb1d8863fd9a'), (70897, 1, 477, NULL, NULL, 'url', '', '{\"ariaLabel\":null,\"customQuery\":null,\"customText\":\"\",\"target\":null,\"title\":null}', '2022-08-23 17:44:58', '2022-08-23 17:44:58', 'c86c8795-36f1-4b94-aa8e-a988caf2820b') (/app/vendor/yiisoft/yii2/db/Schema.php:676)
#0 /app/vendor/yiisoft/yii2/db/Command.php(1307): yii\db\Schema->convertException(Object(PDOException), 'INSERT INTO `le...')
#1 /app/vendor/yiisoft/yii2/db/Command.php(1102): yii\db\Command->internalExecute('INSERT INTO `le...')
#2 /app/vendor/yiisoft/yii2/db/Migration.php(246): yii\db\Command->execute()
#3 /app/vendor/craftcms/cms/src/db/Migration.php(206): yii\db\Migration->batchInsert('{{%lenz_linkfie...', Array, Array)
#4 /app/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(129): craft\db\Migration->batchInsert('{{%lenz_linkfie...', Array, Array)
#5 /app/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(177): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->lenz\linkfield\migrations\{closure}(Array)
#6 /app/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(91): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->updateLinkField(Object(lenz\linkfield\fields\LinkField), '{{%content}}', '')
#7 /app/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(55): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->updateField(Object(lenz\linkfield\fields\LinkField), '{{%content}}')
#8 /app/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(31): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->updateAllFields()
#9 /app/vendor/craftcms/cms/src/db/Migration.php(49): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->safeUp()
#10 /app/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(758): craft\db\Migration->up()
#11 /app/vendor/craftcms/cms/src/console/controllers/MigrateController.php(360): yii\console\controllers\BaseMigrateController->migrateUp('m190417_202153_...')
#12 [internal function]: craft\console\controllers\MigrateController->actionAll()
#13 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#14 /app/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#15 /app/vendor/yiisoft/yii2/console/Controller.php(182): yii\base\Controller->runAction('all', Array)
#16 /app/vendor/yiisoft/yii2/base/Module.php(552): yii\console\Controller->runAction('all', Array)
#17 /app/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('migrate/all', Array)
#18 /app/vendor/craftcms/cms/src/console/Application.php(90): yii\console\Application->runAction('migrate/all', Array)
#19 /app/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('migrate/all', Array)
#20 /app/vendor/craftcms/cms/src/console/Application.php(121): yii\console\Application->handleRequest(Object(craft\console\Request))
#21 /app/vendor/yiisoft/yii2/base/Application.php(384): craft\console\Application->handleRequest(Object(craft\console\Request))
#22 /app/craft(22): yii\base\Application->run()
#23 {main}
*** failed to apply m190417_202153_migrateDataToTable (time: 0.399s)

25 from 26 migrations were applied.

Migration failed. The rest of the migrations are canceled.
Error: exit status 1

mateostabio avatar Aug 23 '22 18:08 mateostabio

We are encountering the same issue:

insert into {{%lenz_linkfield}} ...Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '2260-1-322' for key 'idx_rsvcwinsvbymvidaqvjaixpuchrocewwlzll'

etc...

And this is with:

Craft 4.1.1.1 Super Table 3.0.0 Link Field 2.1.4

LMK if you'd like a copy of my DB & project config.

johndwells avatar Aug 23 '22 22:08 johndwells

Actually, scratch that. I think our issue was re-playing the upgrade on a database that already had the lenz_linkfield table created & populated.

johndwells avatar Aug 24 '22 15:08 johndwells

@johndwells So you got it to work? If so, how did you get passed the error?

mateostabio avatar Aug 24 '22 15:08 mateostabio

@mateostabio Because I run these upgrades locally and multiple times, what must have happened was that in one upgrade attempt, Link Field's migration adds the lenz_linkfield database table, and fills it with content. Then when re-starting an upgrade process a second time, that table lingered in the database. So when I ran the upgrade again, it attempted to write rows that already existed.

So basically my "fix" was making sure that lenz_linkfield was no longer present in the database when running the upgrade.

johndwells avatar Aug 24 '22 16:08 johndwells

@johndwells I tried to make this work, but no luck. Still throwing me this error, even though I removed anything to do with 'lenz_linkfield'

mateostabio avatar Aug 25 '22 23:08 mateostabio

Same issue here, have been trying to upgrade for the last 3 hours, tried every different combination, resaving entries before upgrade, migrates the tables and then comes up with an error. Any ideas of what else I can try to get this to finish the migration?

*** applying m190417_202153_migrateDataToTable > create table {{%lenz_linkfield}} ... done (time: 0.093s) > create unique index idx_paxduwhnumsiglgtctlpeysmilwgdhtuzxcb on {{%lenz_linkfield}} (elementId,siteId,fieldId) ... done (time: 0.073s) > create index idx_yiqksqhzfhepxcmwpwukkoejagydkklushpw on {{%lenz_linkfield}} (fieldId) ... done (time: 0.092s) > create index idx_kzykzdefzoevmjnbgzgvlakmsdmdwblngjly on {{%lenz_linkfield}} (siteId) ... done (time: 0.108s) > add foreign key fk_vohjmxlcgntcyawgrlacplffmiuzktdfmgwr: {{%lenz_linkfield}} (elementId) references {{%elements}} (id) ... done (time: 0.303s) > add foreign key fk_yinganutfyverrdduvpdnfymmzqmshyawert: {{%lenz_linkfield}} (fieldId) references {{%fields}} (id) ... done (time: 0.324s) > add foreign key fk_crgurjjpdjhtzxgfrmlpxqyqrdmcuftujtqr: {{%lenz_linkfield}} (linkedId) references {{%elements}} (id) ... done (time: 0.446s) > add foreign key fk_behrxlmfswnsqxmwqsrhrkdbtrlgoeunuhjl: {{%lenz_linkfield}} (linkedSiteId) references {{%sites}} (id) ... done (time: 0.320s) > update in {{%fields}} ... done (time: 0.019s) > update in {{%fields}} ... done (time: 0.024s) > update in {{%fields}} ... done (time: 0.014s) > update in {{%fields}} ... done (time: 0.015s) > update in {{%fields}} ... done (time: 0.018s) > update in {{%fields}} ... done (time: 0.019s) > update in {{%fields}} ... done (time: 0.017s) > update in {{%fields}} ... done (time: 0.015s) > update in {{%fields}} ... done (time: 0.015s) > update in {{%fields}} ... done (time: 0.015s) > update in {{%fields}} ... done (time: 0.014s) > update in {{%fields}} ... done (time: 0.015s) > update in {{%fields}} ... done (time: 0.014s) > insert into {{%lenz_linkfield}} ... done (time: 0.019s) > drop column field_alertLink from table {{%stc_alertlist}} ... done (time: 0.083s) > insert into {{%lenz_linkfield}} ... done (time: 0.016s) > drop column field_buttonLink from table {{%stc_bannerbuttons}} ... done (time: 0.071s) > insert into {{%lenz_linkfield}} ... done (time: 0.058s) > insert into {{%lenz_linkfield}} ... done (time: 0.054s) > insert into {{%lenz_linkfield}} ... done (time: 0.063s) > insert into {{%lenz_linkfield}} ... done (time: 0.036s) > drop column field_columnLink from table {{%stc_6_column}} ... done (time: 0.068s) > insert into {{%lenz_linkfield}} ... done (time: 0.038s) > drop column field_buttonLink from table {{%stc_4_buttons}} ... done (time: 0.074s) > insert into {{%lenz_linkfield}} ... done (time: 0.034s) > drop column field_linkField from table {{%stc_8_links}} ... done (time: 0.060s) > insert into {{%lenz_linkfield}} ... done (time: 0.015s) > drop column field_sectionLink_mygdnkjb from table {{%stc_10_column}} ... done (time: 0.070s) > insert into {{%lenz_linkfield}} ... done (time: 0.031s) > drop column field_gallerySection_galleryButton from table {{%matrixcontent_contentsections}} ... done (time: 0.085s) > insert into {{%lenz_linkfield}} ... done (time: 0.023s) > drop column field_sectionLink from table {{%stc_9_accordionitem}} ... done (time: 0.068s) > drop column field_buttonLink from table {{%stc_13_buttons}} ... done (time: 0.067s) > insert into {{%lenz_linkfield}} ... done (time: 0.018s) > drop column field_linkField_fadxcnqj from table {{%stc_footercopyrightlinks}} ... done (time: 0.101s) > insert into {{%lenz_linkfield}} ... done (time: 0.025s) > drop column field_redirectLink from table {{%content}} ... done (time: 0.157s) Exception: Syntax error (/home/webdev/www/vhosts/pft/craft/vendor/yiisoft/yii2/helpers/BaseJson.php:147) #0 /home/webdev/www/vhosts/pft/craft/vendor/yiisoft/yii2/helpers/BaseJson.php(128): yii\helpers\BaseJson::handleJsonError() #1 /home/webdev/www/vhosts/pft/craft/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(143): yii\helpers\BaseJson::decode() #2 /home/webdev/www/vhosts/pft/craft/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(91): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->updateLinkField() #3 /home/webdev/www/vhosts/pft/craft/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(55): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->updateField() #4 /home/webdev/www/vhosts/pft/craft/vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php(31): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->updateAllFields() #5 /home/webdev/www/vhosts/pft/craft/vendor/craftcms/cms/src/db/Migration.php(49): lenz\linkfield\migrations\m190417_202153_migrateDataToTable->safeUp() #6 /home/webdev/www/vhosts/pft/craft/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(758): craft\db\Migration->up() #7 /home/webdev/www/vhosts/pft/craft/vendor/craftcms/cms/src/console/controllers/MigrateController.php(360): yii\console\controllers\BaseMigrateController->migrateUp() #8 [internal function]: craft\console\controllers\MigrateController->actionAll() #9 /home/webdev/www/vhosts/pft/craft/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array() #10 /home/webdev/www/vhosts/pft/craft/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams() #11 /home/webdev/www/vhosts/pft/craft/vendor/yiisoft/yii2/console/Controller.php(182): yii\base\Controller->runAction() #12 /home/webdev/www/vhosts/pft/craft/vendor/yiisoft/yii2/base/Module.php(552): yii\console\Controller->runAction() #13 /home/webdev/www/vhosts/pft/craft/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction() #14 /home/webdev/www/vhosts/pft/craft/vendor/craftcms/cms/src/console/Application.php(90): yii\console\Application->runAction() #15 /home/webdev/www/vhosts/pft/craft/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction() #16 /home/webdev/www/vhosts/pft/craft/vendor/craftcms/cms/src/console/Application.php(121): yii\console\Application->handleRequest() #17 /home/webdev/www/vhosts/pft/craft/vendor/yiisoft/yii2/base/Application.php(384): craft\console\Application->handleRequest() #18 /home/webdev/www/vhosts/pft/craft/craft(22): yii\base\Application->run() #19 {main} *** failed to apply m190417_202153_migrateDataToTable (time: 3.472s)

glenwith1n avatar Sep 28 '22 10:09 glenwith1n

@glenwith1n I had the same error with the BaseJson::decode() function in the /vendor/sebastianlenz/linkfield/src/migrations/m190417_202153_migrateDataToTable.php file. I basically traced it down to incorrectly formatted data for that field in the database. You can wrap the $payload = Json::decode($row[$columnName]); line in a tryCatch block to identify the table, field and data that is causing the issue, and then manually correct it in the database. Something like:

try { $payload = Json::decode($row[$columnName]); } catch(\Exception $e) { var_dump($table); var_dump($columnName); var_dump($row); var_dump($e->getMessage()); continue; }

While running ./craft migrate/all

The plugin expects the data in $row[$columnName] to be a JSON string formatted like {"ariaLabel":null,"customQuery":null,"customText":"","target":null,"title":null,"type":"url","value":""}, however in my case it was just a URL string which was throwing the exception error when trying to be json_decoded.

Important note: This particular error will put your database in a non recoverable state, so each time before trying the migrate/all command, ensure your database is restored to a previously working state.

marktundra avatar Oct 06 '22 03:10 marktundra

So basically my "fix" was making sure that lenz_linkfield was no longer present in the database when running the upgrade.

I had success upgrading to Craft 4 by deleting the table lenz_linkfield before runing ./craft migrate/all. If that table only gets created for migrations of the plugin, wouldn't it make sense to clear if before running a migration?

dgsiegel avatar Dec 01 '22 13:12 dgsiegel

The table lenz_linkfield will be created by a migration. If it is already present it means that the migration has already been applied, we cannot just delete it. Migrations run inside a transaction and if something goes south the transaction should be rolled back, so if the migration fails the table lenz_linkfield should not exist in your database after any exceptions.

My guess is that folks that run into that situation usually have the development enabled and when applying the migration issues like deprecation errors break the transaction safety net. However, this is really difficult to debug.

sebastian-lenz avatar Dec 02 '22 12:12 sebastian-lenz

Our Craft installation is almost 3 years old and we've been using the linkfield plugin since then. From what I can tell the lenz_linkfield table has existed almost since then. I have never seen any failed migration or even a warning when upgrading the previous versions.

In any case, just deleting the lenz_linkfield table is working for us, and no data was lost in our case. I double checked right now. The only issue we had was that we had to rebuild the configuration, as the namespace and configuration of this plugin has changed.

dgsiegel avatar Dec 02 '22 12:12 dgsiegel

I confirm that my site is also about 3 years old and has been using this link field plugin for a long time. I will try and see if I can delete this table and get it to work.

mateostabio avatar Dec 02 '22 15:12 mateostabio

Another crucial point for people who might stumble onto this: If you use Craft's own db commands to backup and restore your database, ie. craft db/backup and craft db/restore, existing tables in your local database will not be deleted or overwritten if they don't exist in the database dump.

So if you ever (even a few years ago) ran a LinkField migration and it failed for whatever reason, you will have a lenz_linkfield table in your (local) database, even if you just restored from a fresh database copy (e.g. production). That will certainly trigger the Integrity constraint violation error mentioned above. So you might want to run craft db/drop-all-tables locally before importing your fresh db.

@sebastian-lenz one thing I don't understand yet is that you create the lenz_linkfield inside the migration but never seem to use it inside LinkField. Is that because craft-utils does the heavy loading?

dgsiegel avatar Dec 06 '22 18:12 dgsiegel

@ marktundra Thank you this worked for me managed to get the site upgraded

glenwith1n avatar Jan 20 '23 05:01 glenwith1n

We're in the process of updating a site to Craft 4 and have hit the same issue here. The craft migrate/all command completes 24/25 migrations, the last being related to lenz_linkfield.

I've tried the above making sure the lenz_linkfield table isn't in place - it was when I checked, so I deleted it then tried again. Migration still failed.

This is the first site I've had a go updating to Craft 4 with this particular plugin.

The error I get is:

*** applying m190417_202153_migrateDataToTable
    > create table {{%lenz_linkfield}} ... done (time: 0.010s)
    > create unique index idx_zosdeodsgouvuvgjtirgkkhmucwlrakpzhwm on {{%lenz_linkfield}} (elementId,siteId,fieldId) ... done (time: 0.006s)
    > create index idx_erxswagxeqjdlfkhkzklykrcoixsvajmhvpl on {{%lenz_linkfield}} (fieldId) ... done (time: 0.005s)
    > create index idx_gozusqkicvwmquizybaspaoifnbsgmigrqbm on {{%lenz_linkfield}} (siteId) ... done (time: 0.015s)
    > add foreign key fk_gdtlyecxgoxozlwnoitozwnvyusntduzyfgh: {{%lenz_linkfield}} (elementId) references {{%elements}} (id) ... done (time: 0.022s)
    > add foreign key fk_pgxtyqxcsyytfwvqsplnjdxxzesrnsdedjal: {{%lenz_linkfield}} (fieldId) references {{%fields}} (id) ... done (time: 0.023s)
    > add foreign key fk_zsrzpwoijuggotjyggcjybnfucvtickunktk: {{%lenz_linkfield}} (linkedId) references {{%elements}} (id) ... done (time: 0.059s)
    > add foreign key fk_acseryymrpcsjwnjwrgxkpresgjmvbzvbhfa: {{%lenz_linkfield}} (linkedSiteId) references {{%sites}} (id) ... done (time: 0.050s)
    > update in {{%fields}} ... done (time: 0.002s)
    > update in {{%fields}} ... done (time: 0.001s)
    > update in {{%fields}} ... done (time: 0.001s)
    > update in {{%fields}} ... done (time: 0.001s)
    > update in {{%fields}} ... done (time: 0.001s)
    > update in {{%fields}} ... done (time: 0.001s)
    > update in {{%fields}} ... done (time: 0.000s)
    > update in {{%fields}} ... done (time: 0.001s)
Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 't.field_linkTo' in 'field list'
The SQL being executed was: SELECT `t`.`elementId`, `t`.`siteId`, `t`.`field_linkTo`
FROM `stc_crossselling` `t`
INNER JOIN `elements` `e` ON `t`.`elementId` = `e`.`id` (/var/www/html/vendor/yiisoft/yii2/db/Schema.php:676)

I've tried getting an output like @marktundra but the migration fails further up than the JSON line. The migration fails at:

// Make sure the rows actually exist in the elements table.
    $rows = (new Query())
      ->select(['t.elementId', 't.siteId', 't.'.$columnName])
      ->from(['t' => $table])
      ->innerJoin(['e' => Table::ELEMENTS], '[[t.elementId]] = [[e.id]]')
      ->all();

<> I've compared a db export pre-migration and one post-migration (attempt) and it seems the column that is missing as report by the migration, is in fact in the database before the migrations were attempted. <> Restoring the missing column post migration attempt, I tried the migration again (the linkfield migration being the only one that is now running) and the column is removed during the migration. I've tried this twice and can see the column is removed from the source table each time. <> Found another column that was getting deleted, so re-created that and the original ones. Now getting a Integrity constraint violation error in the migration <> Calling it quits for today. I've tried emptying the tables that keep losing the columns and still either the constraint error or the columns magically disappear.

jamiematrix avatar Feb 15 '23 11:02 jamiematrix

Ran in to this problem today on a small project of mine. Fumbled around for a bit but managed to solve in the end so incase this is helpful for anyone...

Started by downloading a copy of the prod database and ran my Craft 4 update locally, in DDEV with MySQL 5.7. I used LinneaHarts fork initially, which ensured the migrations completed successfully.

Everything seemed fine. Then I merrily deployed to production before a MySQL error on migrations again (insert into {{%lenz_linkfield}} ...Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '15293-1-125' ).

Thought this was weird because I was repeating the same steps that I had just completed locally. Then discovered production was on MySQL 8 🤦. So I just uploaded my local copy of the database and everything was fine.

Not entirely sure if the MySQL version was making a difference but perhaps it is to others 🙃

tomkiss avatar Feb 21 '23 13:02 tomkiss

+1 same issue here - migrate/all results in a SQL-error. After some investigation in Code and Database i found several linkfields in the "problem-table" which are not using JSON-Syntax but direkt links (like httpswww.google.com?param=paramvalue) which are used in our Project without problems. after saving this entries in v3 nothing changed in the database, still direkt links-values, no JSON-code. If i remove every entry without JSON (some are in JSON-Syntax) the migration runs without errors (only if it is the first migration after resetting the database to the state before the failed migration. If i run the migration twice, the error changes and even after removing the links in the table, the error still appears (i think the unsuccessful migration leaves some broken database-parts

Thomas-b-wm avatar Mar 02 '23 16:03 Thomas-b-wm

This fixed it for me in the end https://github.com/sebastian-lenz/craft-linkfield/issues/261 thanks @ItsSeanvD

sander-lameco avatar Apr 24 '23 09:04 sander-lameco