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

Fix migration for PR 66 #70

Merged
merged 2 commits into from
Feb 24, 2018

Conversation

flyinggrizzly
Copy link
Contributor

@flyinggrizzly flyinggrizzly commented Feb 23, 2018

Migration now tries to find an Event object before instantiating on up

This allows migration to continue when an event has multiple instances.

See also #66 (comment)

Steps for verifying migration:

before pulling down latest changes

  1. seed the DB on the feature branch (it creates events with multiple instances which we can use to replicate the situation on staging)
  2. roll back the last migration: bin/rails db:rollback STEP=1--this sets it so we have multiple old events with the same name but different years
  3. try to migrate forward again, get failure

after pulling down latest changes

repeat as above, but the migration will succeed because it will try to find an existing event before attempting to instantiate it

- Event Model, which previously had all info about the event occurence,
becomes EventInstance
- a new Event model now contains event identity
- event creation workflow happens thorugh the instance--an event should
not exist unless we have a record of one of its instances
- update specs for changed models and controllers
- update feature specs to reflect new workflows
- update factories
- update related Submission model to communicate with EventInstance
instead of Event
- fix migration to try to find parent events before creating to avoid
unique key issues
@flyinggrizzly flyinggrizzly changed the title Fix migration for PR 36 Fix migration for PR 66 Feb 23, 2018
@nodunayo
Copy link
Owner

Just looking at this now..

FYI — didn't have to use --force to pull down the latest changes...

@nodunayo nodunayo merged commit c332839 into nodunayo:master Feb 24, 2018
@flyinggrizzly
Copy link
Contributor Author

I think I wrote that before resolving the merge conflict in the web app (airport)... which added another commit to the history so it no longer diverged

@nodunayo
Copy link
Owner

Yay, merged and shipped!!

Thank you, @flyinggrizzly. This was wonderful.

Thank you so much for your patience. Going through a few things right now so I really appreciate it.

Speak soon,

Nadia

@flyinggrizzly
Copy link
Contributor Author

Anytime, and no worries! And thank you for your patience with me, and the support and feedback.

I’ll poke through some of the other issues in a bit too. And I’ll see you at Bath Ruby!

@nodunayo
Copy link
Owner

Oh, yay! Exciting — get to meet my number 1 contributor in the flesh! And thank you for the feedback!

As an FYI, I'll be working on the ability to delete submissions and the design for that next, so don't worry about that piece. I've also got to sort out some config stuff like SSL and think about site backups soon.

Speak soon!

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.

None yet

2 participants