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

Add migration to drop table/column from 20180710170104 #3114

Merged
merged 1 commit into from
Mar 6, 2019

Conversation

spaghetticode
Copy link
Member

Migration 20180710170104 has been reworked with PR #3109 in order to avoid
risky situations for multi-instance Solidus installations.

The table spree_store_credit_update_reasons and the column update_reason_id
from table spree_store_credit_events can be either still be around (this
happens when migration 20180710170104 was run after the mod) or not, so we
need to check the presence of both in advance.

Also, since on rollback the older version of 20180710170104 would create this
table then it cannot be created here in a down method.

When using the updated version of migration 20180710170104, the table creation
will happen in that migration.

Migration `20180710170104` has been reworked with PR#3109 in order to avoid
risky situations for multi-instance Solidus installations.

The table `spree_store_credit_update_reasons` and the column `update_reason_id`
from table `spree_store_credit_events` can be either still be around (this
happens when migration `20180710170104` was run after the mod) or not, so we
need to check the presence of both in advance.

Also, since on rollback the older version of `20180710170104` would create this
table then it cannot be created here in a `down` method.

When using the updated version of migration `20180710170104`, the table creation will happen in that migration.
@spaghetticode spaghetticode force-pushed the drop-table-from-20180710170104 branch from 2011a3c to e08226e Compare February 20, 2019 13:32
@kennyadsl kennyadsl mentioned this pull request Feb 21, 2019
2 tasks
Copy link
Contributor

@aitbw aitbw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Table and column being dropped are not used anymore so it's safe to remove them.

If 20180710170104 migration has been added to a store with v2.8.0 or v2.8.1, they should already not exist. If that migration has been added with v.2.8.2 they will be dropped.

Copy link
Contributor

@jacobherrington jacobherrington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks @spaghetticode!

@kennyadsl kennyadsl merged commit ebba3e0 into solidusio:master Mar 6, 2019
@kennyadsl kennyadsl deleted the drop-table-from-20180710170104 branch March 6, 2019 09:46
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

Successfully merging this pull request may close these issues.

5 participants