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

Upgrades from Craft 2 not working - all settings lost. #55

Closed
bossanova808 opened this issue Apr 2, 2019 · 9 comments
Closed

Upgrades from Craft 2 not working - all settings lost. #55

bossanova808 opened this issue Apr 2, 2019 · 9 comments
Assignees
Labels
Bug Report Something isn't working

Comments

@bossanova808
Copy link

https://github.com/angell-co/Spoon/blob/3b7d9c0f8ee265ca77780ee9584d4a86b64292a9/src/migrations/Install.php#L246

Hey - so not everyone going to 3.1 is going to be on 3 first.

In particular, Commerce users are forced to go to Craft 3.1 if they want Commerce 2 - but of course they will be coming, by definition, from Craft 2 / Commerce V1.

Thus, can I ask that you do a migration that can cope with this please?
Because stopping on 3 along the way is simply not possible in my case :(

@joshangell
Copy link
Contributor

joshangell commented Apr 2, 2019 via email

@joshangell joshangell self-assigned this Apr 3, 2019
@joshangell joshangell added the Bug Report Something isn't working label Apr 3, 2019
@joshangell
Copy link
Contributor

Ho hum. Is it possible for you to send me a DB backup and zip of the project (redact all security config info if you can) to josh@angell.io? I want to make sure I can migrate your exact setup. Its not quite as simple as I thought ...

@bossanova808
Copy link
Author

Hey Josh

Big DB & project, with a lot of customer info in it etc - do you just need the PMM table, or really the whole thing?

(Just a general note - not sure how you're doing it but the most succesful migrations i have seen are the ones that just go into the DB pretty directly and avoid the project stuff...I know e.g. linkit struggled for ages to do it the 'recommended' way but some quick DB code was able to do the same thing much easier...)

jeremy

@joshangell
Copy link
Contributor

joshangell commented Apr 6, 2019 via email

@bossanova808
Copy link
Author

bossanova808 commented Apr 6, 2019 via email

@bossanova808
Copy link
Author

Just a thought...while you are in there looking at this, one little thing - I'd personally prefer to see the Spoon setup stuff moved into the utilities area - to me that left column is for stuff like entries and to give access to things that will change a lot/regularly. Spoon is kinda a static thing, for the most part, once set up.

Just a thought - might be worth asking in Discord what people thing but my OCD doesn't like plugins appearing in there personally.

Of course feel free to completely ignore me.

Most likely I will be doing my Craft 2-> 3 final migration this weekend, so I will just reconfigure Spoon manually after that I guess...not a big deal!

image

@joshangell
Copy link
Contributor

To conclude this - we’ve worked out you can just rename the old craft_pimpmymatrix_blocktypes table to craft_spoon_blocktypes (remove it if it already exists) and everything should work!

@bossanova808
Copy link
Author

Just to confirm - did a test run this morning with a super simple migration:

    public function safeUp()
    {
        $this->dropTableIfExists('{{%spoon_blocktypes}}');
        $this->renameTable('{{%pimpmymatrix_blocktypes}}', '{{%spoon_blocktypes}}');
    }

...and that has worked fine (for my relatively simple case at least!).

@joshangell
Copy link
Contributor

Brilliant, thanks for confirming that @bossanova808!

FYI I’ve opened a new issue for the utilities thing, I’ll think about it and probably ask around :) Follow #60 for updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants