nondestructive_migrations 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/generators/templates/create_data_migrations.rb +11 -0
- data/lib/nondestructive_migrations/railtie.rb +10 -0
- data/lib/tasks/data.rb +34 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Y2YxYzg0YjM3YzU4YjQ1OTQ3ZWUxMjVlYWM2M2Y0YjY3ZTlkYzZkZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjA2ODgzN2U3NmVjMWExYmM2NzNjYjViNzVlZTUwMmE5OWM2OTNiOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2M1MDc0ZjYzOThlMzcyMTVhMWFiOWZlNmRkMzU2MDBkZGQwNmE3MzEyN2Jj
|
10
|
+
MmQ4MDVkMDAwZmVlOTlhZTA4ZDY1NzAxOTRlYjdiNDZlOTdjZjgwOTVlMTMx
|
11
|
+
M2JhYWU2NGM4NzVlZjQ3Njc4ZjJkZDBlN2E3MjFjNDIxMzg5MjI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NGRlN2FlOTA5NTFkNGU4ZGM2NmIzMWYxYjgzYTE4YjZhMGVkMWNjYjkyYzlh
|
14
|
+
ZDAxZTVhOWViZmQwNDJkNWY4MDU2YjFlZjc1NmRmYzk1MzFjODg2YWE1MWMw
|
15
|
+
MjI5MDQ1MjY4ZmIxZGNlZTZlNGYyMzlkZDA3Mjc1OTM0M2Q4ZjY=
|
data/lib/tasks/data.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
namespace :data do
|
4
|
+
task :data_migration_dependencies => :environment do
|
5
|
+
require 'nondestructive_migrations'
|
6
|
+
end
|
7
|
+
|
8
|
+
desc "run data migration (#{MIGRATIONS_PATH})"
|
9
|
+
task :migrate => :data_migration_dependencies do
|
10
|
+
NondestructiveMigrator.migrate(MIGRATIONS_PATH)
|
11
|
+
end
|
12
|
+
|
13
|
+
desc "rollback data migration (#{MIGRATIONS_PATH})"
|
14
|
+
task :rollback => :data_migration_dependencies do
|
15
|
+
step = ENV['STEP'] ? ENV['STEP'].to_i : 1
|
16
|
+
NondestructiveMigrator.rollback(MIGRATIONS_PATH,step)
|
17
|
+
end
|
18
|
+
|
19
|
+
namespace :migrate do
|
20
|
+
desc %Q{runs the "up" for a given _data_ migration VERSION}
|
21
|
+
task :up => :data_migration_dependencies do
|
22
|
+
version = ENV["VERSION"] ? ENV["VERSION"].to_i : nil
|
23
|
+
raise "VERSION is required" unless version
|
24
|
+
NondestructiveMigrator.run(:up, MIGRATIONS_PATH, version)
|
25
|
+
end
|
26
|
+
|
27
|
+
desc %Q{runs the "down" for a given _data_ migration VERSION}
|
28
|
+
task :down => :data_migration_dependencies do
|
29
|
+
version = ENV["VERSION"] ? ENV["VERSION"].to_i : nil
|
30
|
+
raise "VERSION is required" unless version
|
31
|
+
NondestructiveMigrator.run(:down, MIGRATIONS_PATH, version)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nondestructive_migrations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Fleetwood-Boldt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Separate schema-only migrations from nondestrucitve (data) migrations
|
14
14
|
in your Rails app
|
@@ -19,8 +19,11 @@ extra_rdoc_files: []
|
|
19
19
|
files:
|
20
20
|
- lib/generators/data_migration_generator.rb
|
21
21
|
- lib/generators/data_migration_install_generator.rb
|
22
|
+
- lib/generators/templates/create_data_migrations.rb
|
22
23
|
- lib/nondestructive_migrations.rb
|
24
|
+
- lib/nondestructive_migrations/railtie.rb
|
23
25
|
- lib/nondestructive_migrator.rb
|
26
|
+
- lib/tasks/data.rb
|
24
27
|
homepage: https://github.com/jasonfb/nondestructive_migrations
|
25
28
|
licenses:
|
26
29
|
- MIT
|