seed_data_migrations 0.0.1.10 → 0.0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,6 +18,7 @@ module ValidationIssues
18
18
 
19
19
  def copy_migrations
20
20
  migration_template "seed_migrations_migration.rb", "db/migrate/add_seed_migrations_table.rb"
21
+ empty_directory("db/seeds")
21
22
  end
22
23
  end
23
24
  end
@@ -1,3 +1,3 @@
1
1
  module SeedDataMigrations
2
- VERSION = "0.0.1.10"
2
+ VERSION = "0.0.1.11"
3
3
  end
@@ -5,6 +5,15 @@
5
5
 
6
6
 
7
7
  db_namespace = namespace :db do
8
+
9
+ desc "Migrate the seed data (options: VERSION=x, VERBOSE=false, SCOPE=blog)."
10
+ task :migrate_data => [:environment, :load_config] do
11
+ ActiveRecord::DataMigration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
12
+ ActiveRecord::DataMigrator.migrate(ActiveRecord::DataMigrator.migrations_paths, ENV["VERSION"] ? ENV["VERSION"].to_i : nil) do |migration|
13
+ ENV["SCOPE"].blank? || (ENV["SCOPE"] == migration.scope)
14
+ end
15
+ end
16
+
8
17
  # rake db:migrate_data --trace
9
18
  desc "migrate seed data in /db/seeds/*"
10
19
  namespace :migrate_data do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seed_data_migrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.10
4
+ version: 0.0.1.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: