From 982e6f9b6b15400f989b439f8b3e1672d09f5c3a Mon Sep 17 00:00:00 2001 From: Pistos Date: Mon, 17 Oct 2011 10:52:03 -0400 Subject: [PATCH 1/3] Added missing rollback for photo migration. --- ...12215141_move_photos_to_their_own_table.rb | 33 +++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/db/migrate/20111012215141_move_photos_to_their_own_table.rb b/db/migrate/20111012215141_move_photos_to_their_own_table.rb index 0bec98f25..fba0c3fca 100644 --- a/db/migrate/20111012215141_move_photos_to_their_own_table.rb +++ b/db/migrate/20111012215141_move_photos_to_their_own_table.rb @@ -48,7 +48,35 @@ INSERT INTO posts FROM photos SQL - execute < Date: Mon, 17 Oct 2011 11:53:40 -0400 Subject: [PATCH 2/3] Correct down migration for photo migration under PostgreSQL. --- ...12215141_move_photos_to_their_own_table.rb | 35 ++++++++++++++----- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/db/migrate/20111012215141_move_photos_to_their_own_table.rb b/db/migrate/20111012215141_move_photos_to_their_own_table.rb index fba0c3fca..c4463ba83 100644 --- a/db/migrate/20111012215141_move_photos_to_their_own_table.rb +++ b/db/migrate/20111012215141_move_photos_to_their_own_table.rb @@ -40,15 +40,24 @@ SQL def self.down - execute < Date: Mon, 17 Oct 2011 13:21:38 -0400 Subject: [PATCH 3/3] Corrected SQL syntax error in MySQL down migration (in MovePhotosToTheirOwnTable). --- db/migrate/20111012215141_move_photos_to_their_own_table.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/db/migrate/20111012215141_move_photos_to_their_own_table.rb b/db/migrate/20111012215141_move_photos_to_their_own_table.rb index c4463ba83..77604f756 100644 --- a/db/migrate/20111012215141_move_photos_to_their_own_table.rb +++ b/db/migrate/20111012215141_move_photos_to_their_own_table.rb @@ -89,8 +89,7 @@ SQL execute <