Merge pull request #60 from oliverguenther/fix/legacy_yamler

Use LegacyYamler for migration from syck
pull/6827/head
Oliver Günther 9 years ago
commit 127bc799db
  1. 10
      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

Loading…
Cancel
Save