From 0c260f76e6da143330ddc26a2bdffcc946cf377d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Wed, 2 Sep 2015 22:31:05 +0200 Subject: [PATCH] Use LegacyYamler for migration from syck --- ...03172842_my_project_page_migrate_serialized_yaml.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/db/migrate/20130903172842_my_project_page_migrate_serialized_yaml.rb b/db/migrate/20130903172842_my_project_page_migrate_serialized_yaml.rb index fa3e59826e..9b4abd8b60 100644 --- a/db/migrate/20130903172842_my_project_page_migrate_serialized_yaml.rb +++ b/db/migrate/20130903172842_my_project_page_migrate_serialized_yaml.rb @@ -18,20 +18,18 @@ # See doc/COPYRIGHT.md for more details. #++ -require Rails.root.join("db","migrate","migration_utils","yaml_migrator").to_s +require Rails.root.join("db","migrate","migration_utils","legacy_yamler").to_s class MyProjectPageMigrateSerializedYaml < ActiveRecord::Migration - include Migration::YamlMigrator + include Migration::LegacyYamler def up ['top', 'left', 'right', 'hidden'].each do |column| - migrate_yaml('my_projects_overviews', column, 'syck', 'psych') + migrate_to_psych('my_projects_overviews', column) end end def down - ['top', 'left', 'right', 'hidden'].each do |column| - migrate_yaml('my_projects_overviews', column, 'psych', 'syck') - end + puts 'YAML data serialized with Psych is still compatible with Syck. Skipping migration.' end end