Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration issue Craft 2 --> Craft 3 losing data #413

Closed
boldenamsterdam opened this issue May 26, 2021 · 2 comments
Closed

Migration issue Craft 2 --> Craft 3 losing data #413

boldenamsterdam opened this issue May 26, 2021 · 2 comments

Comments

@boldenamsterdam
Copy link

boldenamsterdam commented May 26, 2021

Hi @engram-design

We are in the middle of preparing a migration from Craft 2 to Craft 3 but are facing issues with losing data.

Description
During the migration from a Craft 2 + Commerce 1 --> Craft 3 + Commerce 2 we noticed that we lost data from Super Table fields.
During the migration process in the CLI, Super Table does show some error messages, but is finishes the migration successfully. The errors are displayed in the step:

applying m190120_000000_fix_supertablecontent_tables

Additional info Craft 2 setup

  • Plugin version: 1.0.6
  • Craft version: 2.9.2
  • Multi-site: Yes (2 languages)

Additional info Craft 3 setup

  • Plugin version: 2.6.8
  • Craft version: 3.6.15
  • Multi-site: Yes (2 languages)

Additional context
We have a setup with multiple Super Table fields that are making use of the plugin field FocusPoint
We are not able to identify if this is the field that is causing the issue.
We already re-tried the migration by changing the Super Table fields containing the Focus Point field to a regular Asset field before we migrate to Craft 3.
Unfortunately the error is still being displayed in the CLI during migration process and we still lost data, even from plain text fields that are used in some Super Table fields.

Sorry for the CLI message being not readable.
There are to many markdown characters in there 😣

If any additional info is needed, please let us know.

Cheers,
AP

`

  • applying m180210_000000_migrate_content_tables
    {{%supertablecontent_productoverviewimages}} -> {{%stc_productoverviewimages}}

    rename table {{%supertablecontent_productoverviewimages}} to {{%stc_productoverviewimages}} ... done (time: 0.008s)
    {{%supertablecontent_4_items}} -> {{%stc_4_items}}

    rename table {{%supertablecontent_4_items}} to {{%stc_4_items}} ... done (time: 0.014s)
    {{%supertablecontent_cover}} -> {{%stc_cover}}

    rename table {{%supertablecontent_cover}} to {{%stc_cover}} ... done (time: 0.011s)
    {{%supertablecontent_introimageright}} -> {{%stc_introimageright}}

    rename table {{%supertablecontent_introimageright}} to {{%stc_introimageright}} ... done (time: 0.010s)
    {{%supertablecontent_cite}} -> {{%stc_cite}}

    rename table {{%supertablecontent_cite}} to {{%stc_cite}} ... done (time: 0.036s)
    {{%supertablecontent_socialmediachannels}} -> {{%stc_socialmediachannels}}

    rename table {{%supertablecontent_socialmediachannels}} to {{%stc_socialmediachannels}} ... done (time: 0.012s)
    {{%supertablecontent_productsizes}} -> {{%stc_productsizes}}

    rename table {{%supertablecontent_productsizes}} to {{%stc_productsizes}} ... done (time: 0.008s)
    {{%supertablecontent_productusp}} -> {{%stc_productusp}}

    rename table {{%supertablecontent_productusp}} to {{%stc_productusp}} ... done (time: 0.013s)

  • applied m180210_000000_migrate_content_tables (time: 0.174s)

  • applying m180211_000000_type_columns

    alter column type in table {{%elements}} to string NOT NULL ... done (time: 0.005s)
    update in {{%elements}} ... done (time: 0.222s)
    alter column type in table {{%elementindexsettings}} to string NOT NULL ... done (time: 0.009s)
    update in {{%elementindexsettings}} ... done (time: 0.008s)
    alter column type in table {{%fieldlayouts}} to string NOT NULL ... done (time: 0.006s)
    update in {{%fieldlayouts}} ... done (time: 0.014s)
    alter column type in table {{%fields}} to string NOT NULL ... done (time: 0.009s)
    update in {{%fields}} ... done (time: 0.014s)

  • applied m180211_000000_type_columns (time: 0.317s)

  • applying m180219_000000_sites

    drop index craft_idx_uucyclahmtrnpkzlqjgnvfbgllpokwcyisnl on {{%supertableblocks}} ... done (time: 0.006s)
    drop column ownerLocale from table {{%supertableblocks}} ... done (time: 0.190s)
    drop foreign key craft_fk_bsxkmqmjqbzpjfnetzkspoiswrpltlfhpulf from table craft_stc_4_items ... done (time: 0.009s)
    drop foreign key craft_supertablecontent_4_items_elementId_fk from table craft_stc_4_items ... done (time: 0.022s)
    drop index craft_supertablecontent_4_items_elementId_locale_unq_idx on craft_stc_4_items ... done (time: 0.010s)
    drop index craft_supertablecontent_4_items_locale_fk on craft_stc_4_items ... done (time: 0.019s)
    drop index craft_fk_bsxkmqmjqbzpjfnetzkspoiswrpltlfhpulf on craft_stc_4_items ... done (time: 0.011s)
    rename column locale__siteId in table craft_stc_4_items to siteId ... done (time: 0.009s)
    create unique index craft_idx_jgoaqcfukvncvsetrnrvkkwyqphyfcysjqxi on craft_stc_4_items (elementId,siteId) ... done (time: 0.013s)
    add foreign key craft_fk_iprpkiptrovdaansdxgjghlalaaceiufcvhd: craft_stc_4_items (elementId) references {{%elements}} (id) ... done (time: 0.080s)
    add foreign key craft_fk_lovqojozikycwlmpgnfzaecdyrkpvuvqkbgg: craft_stc_4_items (siteId) references {{%sites}} (id) ... done (time: 0.044s)
    drop column locale from table craft_stc_4_items ... done (time: 0.066s)
    drop foreign key craft_fk_wlspemdwmizvhajiahygbrjgrehwsumcttme from table craft_stc_cite ... done (time: 0.011s)
    drop foreign key craft_supertablecontent_cite_elementId_fk from table craft_stc_cite ... done (time: 0.009s)
    drop index craft_supertablecontent_cite_elementId_locale_unq_idx on craft_stc_cite ... done (time: 0.010s)
    drop index craft_supertablecontent_cite_locale_fk on craft_stc_cite ... done (time: 0.016s)
    drop index craft_fk_wlspemdwmizvhajiahygbrjgrehwsumcttme on craft_stc_cite ... done (time: 0.010s)
    rename column locale__siteId in table craft_stc_cite to siteId ... done (time: 0.010s)
    create unique index craft_idx_nhqfnefkvpvqcplcnwvbqwwzpkbrwhxvtzcq on craft_stc_cite (elementId,siteId) ... done (time: 0.013s)
    add foreign key craft_fk_neiqucrfrqhbxhjupvztcecxfcfbgzzkawgd: craft_stc_cite (elementId) references {{%elements}} (id) ... done (time: 0.075s)
    add foreign key craft_fk_fcrljauruwefsyuqlqexypvwbltqcmctqrjh: craft_stc_cite (siteId) references {{%sites}} (id) ... done (time: 0.043s)
    drop column locale from table craft_stc_cite ... done (time: 0.089s)
    drop foreign key craft_fk_epmgizscznsgimexqpldbhykxnengldfndeo from table craft_stc_cover ... done (time: 0.014s)
    drop foreign key craft_supertablecontent_cover_elementId_fk from table craft_stc_cover ... done (time: 0.007s)
    drop index craft_supertablecontent_cover_elementId_locale_unq_idx on craft_stc_cover ... done (time: 0.011s)
    drop index craft_supertablecontent_cover_locale_idx on craft_stc_cover ... done (time: 0.012s)
    drop index craft_fk_epmgizscznsgimexqpldbhykxnengldfndeo on craft_stc_cover ... done (time: 0.011s)
    rename column locale__siteId in table craft_stc_cover to siteId ... done (time: 0.012s)
    create unique index craft_idx_aevmmxqfnsplxgdjthsvigmpyhxufaxzxgvl on craft_stc_cover (elementId,siteId) ... done (time: 0.019s)
    add foreign key craft_fk_asbiuytnurdknxaiqkoewnsaruxszsyjbyhf: craft_stc_cover (elementId) references {{%elements}} (id) ... done (time: 0.068s)
    add foreign key craft_fk_qjrsaitpmuonsnkyuktmxzoeozczxiqlopvz: craft_stc_cover (siteId) references {{%sites}} (id) ... done (time: 0.042s)
    drop column locale from table craft_stc_cover ... done (time: 0.070s)
    drop foreign key craft_fk_nnhlilrknzljeozxywhhwsijcqwhuvtrtgqi from table craft_stc_introimageright ... done (time: 0.006s)
    drop foreign key craft_supertablecontent_introimageright_elementId_fk from table craft_stc_introimageright ... done (time: 0.005s)
    drop index craft_supertablecontent_introimageright_elementId_locale_unq_idx on craft_stc_introimageright ... done (time: 0.007s)
    drop index craft_supertablecontent_introimageright_locale_fk on craft_stc_introimageright ... done (time: 0.011s)
    drop index craft_fk_nnhlilrknzljeozxywhhwsijcqwhuvtrtgqi on craft_stc_introimageright ... done (time: 0.010s)
    rename column locale__siteId in table craft_stc_introimageright to siteId ... done (time: 0.011s)
    create unique index craft_idx_omncllwiyreuawdlkbrrlsjtkvlfbxkyktga on craft_stc_introimageright (elementId,siteId) ... done (time: 0.016s)
    add foreign key craft_fk_wxpikrxixadaviwoncsbasvyppsiawfweuhp: craft_stc_introimageright (elementId) references {{%elements}} (id) ... done (time: 0.069s)
    add foreign key craft_fk_ncjdceikhdbcegrnyzbwkkrsyecqswducztd: craft_stc_introimageright (siteId) references {{%sites}} (id) ... done (time: 0.056s)
    drop column locale from table craft_stc_introimageright ... done (time: 0.057s)
    drop foreign key craft_fk_gbolhrjpqguvaebjnarchuuzgwcjxkuadhnr from table craft_stc_productoverviewimages ... done (time: 0.010s)
    drop foreign key craft_supertablecontent_productoverviewimages_elementId_fk from table craft_stc_productoverviewimages ... done (time: 0.007s)
    drop index craft_supertableconte_productoverviewimag_elementI_local_unq_idx on craft_stc_productoverviewimages ... done (time: 0.017s)
    drop index craft_supertablecontent_productoverviewimages_locale_fk on craft_stc_productoverviewimages ... done (time: 0.012s)
    drop index craft_fk_gbolhrjpqguvaebjnarchuuzgwcjxkuadhnr on craft_stc_productoverviewimages ... done (time: 0.009s)
    rename column locale__siteId in table craft_stc_productoverviewimages to siteId ... done (time: 0.013s)
    create unique index craft_idx_gllxjpmiybsxsgjatgsewkllawvztppqzpvv on craft_stc_productoverviewimages (elementId,siteId) ... done (time: 0.018s)
    add foreign key craft_fk_thylzluqvkwwovjkiftqzqtkiagewimzebny: craft_stc_productoverviewimages (elementId) references {{%elements}} (id) ... done (time: 0.101s)
    add foreign key craft_fk_cdpmotfuiqqopwouqobwspzbawxmysqkefzh: craft_stc_productoverviewimages (siteId) references {{%sites}} (id) ... done (time: 0.070s)
    drop column locale from table craft_stc_productoverviewimages ... done (time: 0.083s)
    drop foreign key craft_fk_xongiyuvmzvncchntnhfrdjzhzlsulempwap from table craft_stc_productsizes ... done (time: 0.011s)
    drop foreign key craft_supertablecontent_productsizes_elementId_fk from table craft_stc_productsizes ... done (time: 0.007s)
    drop index craft_supertablecontent_productsizes_elementId_locale_unq_idx on craft_stc_productsizes ... done (time: 0.014s)
    drop index craft_supertablecontent_productsizes_locale_fk on craft_stc_productsizes ... done (time: 0.023s)
    drop index craft_fk_xongiyuvmzvncchntnhfrdjzhzlsulempwap on craft_stc_productsizes ... done (time: 0.007s)
    rename column locale__siteId in table craft_stc_productsizes to siteId ... done (time: 0.007s)
    create unique index craft_idx_kvvbqrqacbwzxmqoyolvpjpkbsgqfcqotuyu on craft_stc_productsizes (elementId,siteId) ... done (time: 0.024s)
    add foreign key craft_fk_bysqahveeeucghxffchhmifbxlhjaxpndtiy: craft_stc_productsizes (elementId) references {{%elements}} (id) ... done (time: 0.133s)
    add foreign key craft_fk_esvwkkhxumdiaifpukqtdjwsjpuckwuxpscw: craft_stc_productsizes (siteId) references {{%sites}} (id) ... done (time: 0.081s)
    drop column locale from table craft_stc_productsizes ... done (time: 0.111s)
    drop foreign key craft_fk_utpzfzonrbioihhzjaxrfkzrwqygxwiuwpdf from table craft_stc_productusp ... done (time: 0.006s)
    drop foreign key craft_supertablecontent_productusp_elementId_fk from table craft_stc_productusp ... done (time: 0.009s)
    drop index craft_supertablecontent_productusp_elementId_locale_unq_idx on craft_stc_productusp ... done (time: 0.010s)
    drop index craft_supertablecontent_productusp_locale_fk on craft_stc_productusp ... done (time: 0.008s)
    drop index craft_fk_utpzfzonrbioihhzjaxrfkzrwqygxwiuwpdf on craft_stc_productusp ... done (time: 0.011s)
    rename column locale__siteId in table craft_stc_productusp to siteId ... done (time: 0.010s)
    create unique index craft_idx_kzwsskmqxtinzybsrmtasbvsteevuczrealh on craft_stc_productusp (elementId,siteId) ... done (time: 0.021s)
    add foreign key craft_fk_gjvgbmjxijpkbudgjwehtipwbezuzppiwamt: craft_stc_productusp (elementId) references {{%elements}} (id) ... done (time: 0.158s)
    add foreign key craft_fk_xqiwvxrjiqligimrcusqylxuqxwxklbplxyg: craft_stc_productusp (siteId) references {{%sites}} (id) ... done (time: 0.108s)
    drop column locale from table craft_stc_productusp ... done (time: 0.139s)
    drop foreign key craft_fk_vswgqynwffyaddobykbdudhahqbazxxwzezv from table craft_stc_socialmediachannels ... done (time: 0.006s)
    drop foreign key craft_supertablecontent_socialmediachannels_elementId_fk from table craft_stc_socialmediachannels ... done (time: 0.008s)
    drop index craft_supertableconten_socialmediachannel_elementI_locale_unq_id on craft_stc_socialmediachannels ... done (time: 0.011s)
    drop index craft_supertablecontent_socialmediachannels_locale_fk on craft_stc_socialmediachannels ... done (time: 0.009s)
    drop index craft_fk_vswgqynwffyaddobykbdudhahqbazxxwzezv on craft_stc_socialmediachannels ... done (time: 0.012s)
    rename column locale__siteId in table craft_stc_socialmediachannels to siteId ... done (time: 0.012s)
    create unique index craft_idx_qjesnnegbnrhmirwepwkfqwjkyahzwzydlai on craft_stc_socialmediachannels (elementId,siteId) ... done (time: 0.039s)
    add foreign key craft_fk_pydbcbnwmnifdymlomrbmlydlrjlficdhqpc: craft_stc_socialmediachannels (elementId) references {{%elements}} (id) ... done (time: 0.044s)
    add foreign key craft_fk_jfkseqvjclsihwvhourlpmsahnnxgxrepxna: craft_stc_socialmediachannels (siteId) references {{%sites}} (id) ... done (time: 0.039s)
    drop column locale from table craft_stc_socialmediachannels ... done (time: 0.055s)
    update in {{%fields}} ... done (time: 0.012s)
    update in {{%fields}} ... done (time: 0.007s)
    update in {{%fields}} ... done (time: 0.004s)
    update in {{%fields}} ... done (time: 0.003s)
    update in {{%fields}} ... done (time: 0.004s)
    update in {{%fields}} ... done (time: 0.006s)
    update in {{%fields}} ... done (time: 0.003s)
    update in {{%fields}} ... done (time: 0.004s)

  • applied m180219_000000_sites (time: 5.187s)

  • applying m180220_000000_fix_context

  • applied m180220_000000_fix_context (time: 0.021s)

  • applying m190117_000000_soft_deletes

    add column deletedWithOwner boolean NULL DEFAULT NULL AFTER sortOrder to table {{%supertableblocks}} ... done (time: 0.182s)

  • applied m190117_000000_soft_deletes (time: 0.201s)

  • applying m190117_000001_context_to_uids

    update in {{%fields}} ... done (time: 0.010s)
    update in {{%fields}} ... done (time: 0.003s)
    update in {{%fields}} ... done (time: 0.002s)
    update in {{%fields}} ... done (time: 0.002s)
    update in {{%fields}} ... done (time: 0.003s)
    update in {{%fields}} ... done (time: 0.002s)
    update in {{%fields}} ... done (time: 0.003s)
    update in {{%fields}} ... done (time: 0.005s)
    update in {{%fields}} ... done (time: 0.002s)
    update in {{%fields}} ... done (time: 0.002s)
    update in {{%fields}} ... done (time: 0.003s)
    update in {{%fields}} ... done (time: 0.003s)
    update in {{%fields}} ... done (time: 0.005s)
    update in {{%fields}} ... done (time: 0.002s)
    update in {{%fields}} ... done (time: 0.002s)
    update in {{%fields}} ... done (time: 0.002s)
    update in {{%fields}} ... done (time: 0.003s)
    update in {{%fields}} ... done (time: 0.009s)
    update in {{%fields}} ... done (time: 0.002s)
    update in {{%fields}} ... done (time: 0.002s)
    update in {{%fields}} ... done (time: 0.002s)
    update in {{%fields}} ... done (time: 0.003s)
    update in {{%fields}} ... done (time: 0.006s)
    update in {{%fields}} ... done (time: 0.002s)
    update in {{%fields}} ... done (time: 0.002s)
    update in {{%fields}} ... done (time: 0.002s)

  • applied m190117_000001_context_to_uids (time: 0.113s)

  • applying m190120_000000_fix_supertablecontent_tables

    Trying to create missing content table for Issue with a Redactor field in a column, Redactor formatting buttons not working #3 ...
    Field mismatch craft\fields\MissingField is not a Super Table field ...
    Trying to create missing content table for Improved LinkIt styling #23 ...
    Field mismatch craft\fields\MissingField is not a Super Table field ...
    Trying to create missing content table for Fixed: width calculation of the buttons container #30 ...
    Field mismatch craft\fields\MissingField is not a Super Table field ...
    Trying to create missing content table for Static field containing no values returns errors as a null value when trying to access table field in templates #31 ...
    Field mismatch craft\fields\MissingField is not a Super Table field ...
    Trying to create missing content table for Update FeedMe prep to allow for static field #81 ...
    Field mismatch craft\fields\MissingField is not a Super Table field ...
    Trying to create missing content table for using a switch in a template for a supertable row #88 ...
    Field mismatch craft\fields\MissingField is not a Super Table field ...
    Trying to create missing content table for Add translation method indicator for fields #169 ...
    Field mismatch craft\fields\MissingField is not a Super Table field ...
    Trying to create missing content table for Width doesn't work #15 ...
    Field mismatch craft\fields\MissingField is not a Super Table field ...
    ERROR: Blocktype field Issue with a Redactor field in a column, Redactor formatting buttons not working #3 is not a Super Table field ...
    ERROR: Blocktype field Improved LinkIt styling #23 is not a Super Table field ...
    ERROR: Blocktype field Static field containing no values returns errors as a null value when trying to access table field in templates #31 is not a Super Table field ...
    ERROR: Blocktype field Fixed: width calculation of the buttons container #30 is not a Super Table field ...
    ERROR: Blocktype field Width doesn't work #15 is not a Super Table field ...
    ERROR: Blocktype field Update FeedMe prep to allow for static field #81 is not a Super Table field ...
    ERROR: Blocktype field using a switch in a template for a supertable row #88 is not a Super Table field ...
    ERROR: Blocktype field Add translation method indicator for fields #169 is not a Super Table field ...

  • applied m190120_000000_fix_supertablecontent_tables (time: 0.058s)

  • applying m190131_000000_fix_supertable_missing_fields

  • applied m190131_000000_fix_supertable_missing_fields (time: 0.013s)

  • applying m190227_100000_fix_project_config

  • applied m190227_100000_fix_project_config (time: 0.060s)

  • applying m190511_100000_fix_project_config

  • applied m190511_100000_fix_project_config (time: 0.015s)

  • applying m190520_000000_fix_project_config

  • applied m190520_000000_fix_project_config (time: 0.020s)

  • applying m190714_000000_propagation_method

    drop foreign key craft_fk_vfejmlqtjgflvdkxyemqbhrzjjorkjeucule from table craft_supertableblocks ... done (time: 0.009s)
    drop index craft_idx_nbyhstfduwloxjqlnsievucnvzzgnzhzosut on {{%supertableblocks}} ... done (time: 0.012s)
    drop column ownerSiteId from table {{%supertableblocks}} ... done (time: 0.167s)

  • applied m190714_000000_propagation_method (time: 0.233s)

  • applying m191127_000000_fix_width

  • applied m191127_000000_fix_width (time: 0.029s)
    `

@engram-design
Copy link
Member

Quick note, have you tried doing the content table checker/fixer utility in Settings > Super Table? Refer to https://github.com/verbb/super-table#updating-to-craft-31

@boldenamsterdam
Copy link
Author

Hi @engram-design ,

Thanks for your reply.
That was indeed the trick, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants