Skip to content

Fixed bugs in migrations. #3

Closed
wants to merge 3 commits into from

1 participant

@michaelstalker

The AddPositionToAttachments migration broke when it executed Page.all(:include => :attachments).each do |page| (I think this was the line). It created a MySQL error because the parent_id didn't exist, yet, but the code assumed it did.

I also edited some self.down methods so we could undo migrations cleanly; there were some errors in those methods, too.

@michaelstalker

I tried to isolate the migration fixes by changing the source for this pull request to my migrations branch. That apparently didn't work. Use caution if you decide to pull in commit 027e14d.

@michaelstalker

You may want to ignore commits 027e14d and 66811c8. They were never meant to go with this pull request :(

@michaelstalker

The methods shouldn't have been deleted. I was initially going to have some methods in Admin::AssetsHelper and others in AssetsHelper, but I later decided not to. I didn't restore all the methods I removed from this file. I added those back in another commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.