Skip to content

Commit

Permalink
Fixed migration for 1.12.0 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Reyko committed Dec 10, 2014
1 parent 7c85bc4 commit 7bf7041
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions db/upgrade_migrations/08_upgrade_to_1_12_0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def self.down
")
execute("
UPDATE comfy_cms_categories SET categorized_type = 'Cms::#{klass}'
WHERE categorized_type = 'Comfy::Cms::#{c}'
WHERE categorized_type = 'Comfy::Cms::#{klass}'
")
end

Expand All @@ -65,7 +65,13 @@ def self.down
rename_table :comfy_cms_blocks, :cms_blocks
rename_table :comfy_cms_snippets, :cms_snippets
rename_table :comfy_cms_files, :cms_files
rename_index :cms_revisions,
'index_cms_revisions_on_record_type_id_and_created',
'index_cms_revisions_on_record_type_and_record_id_and_created_at'
rename_table :comfy_cms_revisions, :cms_revisions
rename_index :cms_categories,
'index_cms_categories_on_site_id_and_cat_type_and_label',
'index_cms_categories_on_site_id_and_categorized_type_and_label'
rename_table :comfy_cms_categories, :cms_categories
rename_table :comfy_cms_categorizations, :cms_categorizations

Expand All @@ -74,4 +80,4 @@ def self.down
rename_column :cms_blocks, :blockable_id, :page_id
rename_column :cms_pages, :content_cache, :content
end
end
end

0 comments on commit 7bf7041

Please sign in to comment.