Sha256: 871ce28b4168dbcbcb000ca5c445bd23446e96d441eb3f72f9a6485b2cc1bfd8
Contents?: true
Size: 624 Bytes
Versions: 44
Compression:
Stored size: 624 Bytes
Contents
module DataMigrate class LegacyMigrator def initialize(migrations_paths = "db/data") @migrations_paths = migrations_paths || "db/data" end def migrate dates = DataMigrate::DataMigrator.migrations(@migrations_paths).collect(&:version) legacy = ActiveRecord::SchemaMigration.where(version: dates) legacy.each do |v| begin version = v.version puts "Creating #{version} in data schema" DataMigrate::DataSchemaMigration.create(version: version) rescue ActiveRecord::RecordNotUnique nil end end end end end
Version data entries
44 entries across 44 versions & 1 rubygems