Skip to content
This repository was archived by the owner on Jul 24, 2020. It is now read-only.

853 tweaked migration to fix db:migrate #875

Merged
merged 1 commit into from
Aug 1, 2014
Merged

853 tweaked migration to fix db:migrate #875

merged 1 commit into from
Aug 1, 2014

Conversation

orenyk
Copy link
Contributor

@orenyk orenyk commented Aug 1, 2014

Resolves #853 by removing problematic lines in the migration.

@orenyk
Copy link
Contributor Author

orenyk commented Aug 1, 2014

This also results in a schema conflict (it removes null: false from all of the created_at and updated_at fields). I haven't committed it yet but we can deal with that when it gets pulled in. I think this is an acceptable solution to the problem; any deployed instance that needs to run the unchanged migration (e.g. v3.4) will not run the changed migration when upgraded to v4.0, and any instance starting at v4.0 doesn't need those lines in the migration since the relevant table is simply dropped by the end.

@squidgetx
Copy link
Contributor

What happens if someone who is late to the party tries to upgrade from 3.3 to 3.4 with this edited migration? Will the migrations run (and of lesser importance but still a valid question: will AA comments still work?)

@orenyk
Copy link
Contributor Author

orenyk commented Aug 1, 2014

That's the beauty of it; the migration was only edited in v4.0. Anyone who checks out v3.4 will have the original migration.

@squidgetx
Copy link
Contributor

Ah, I get it now.

Merge away!

orenyk added a commit that referenced this pull request Aug 1, 2014
@orenyk orenyk merged commit 94ae94e into master Aug 1, 2014
@orenyk orenyk deleted the 853_migrations branch August 5, 2014 02:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migration issue due to ActiveAdmin removal
2 participants