0

Long story short, I migrated from Craft 2 to Craft 3 but had an issue with a plugin.

Database Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'emailTemplateId' in 'where clause' The SQL being executed was: UPDATE craft_sproutemail_notificationemailsSET emailTemplateId='barrelstrength\sproutforms\integrations\sproutemail\emailtemplates\basic\BasicSproutFormsNotification' WHERE emailTemplateId='sproutforms-basicsproutformsnotification'

I was told to reinstall Craft 2, update the plugin, and then migrate over to Craft 3.

I moved the Craft 3 files, reinstall Craft 2 and am trying to import the backup database. The problem is my backup database has existing tables that cause errors.

According to this post:

Best practice on importing Craft db backups?

They key is to get the database from the "backup database" function in 
the control panel that includes

DROP TABLE IF EXISTS craft_analytics_settings; ...

before it creates all the tables so you shouldn't have to delete any 
tables first, been working for us that way since the beginning.

I just don't know where to begin doing so. Is there any suggestions? At this point, I just want to get any version of the site back.

Thank you

1

Your problem is "only" database.

The first thing - create a another copy of your backup file.

Have you got phpMyAdmin?

You can create a new database and set env file in Craft.

or

You can drop all tables there and try load sql backup. If it is not working try create individual tables first after relations and data.

  • I dropped tables and re imported database. When I go to www.mysite.com, craft tries to reinstall. Thank you for replying, I'm not sure what you mean by "after relations and data". – Mike Sep 26 '18 at 19:26
  • If there is a mistake in backup sql file, you can run parts: create tables, create relations between tables (other names are constraints or foreign keys), so you have the structure of db and lastly you run insert into (data). I'm happy that your Craft works. – lenka Sep 26 '18 at 20:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.