data_migrate 3.0.1 → 3.1.0
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.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rspec +3 -0
- data/.travis.yml +18 -0
- data/Appraisals +17 -0
- data/Changelog.md +5 -0
- data/Gemfile.rails5 +5 -0
- data/README.md +20 -15
- data/data_migrate.gemspec +10 -1
- data/gemfiles/rails_4.0.gemfile +7 -0
- data/gemfiles/rails_4.1.gemfile +7 -0
- data/gemfiles/rails_4.2.gemfile +8 -0
- data/gemfiles/rails_5.0.gemfile +7 -0
- data/lib/data_migrate.rb +5 -1
- data/lib/data_migrate/data_migrator.rb +24 -5
- data/lib/data_migrate/migration_five.rb +26 -0
- data/lib/data_migrate/railtie.rb +1 -1
- data/lib/data_migrate/version.rb +1 -1
- data/lib/generators/data_migration/data_migration_generator.rb +8 -0
- data/lib/generators/data_migration/templates/data_migration.rb +1 -1
- data/spec/data_migrate/data_migrator_spec.rb +45 -0
- data/spec/data_migrate/data_schema_migration_spec.rb +16 -0
- data/spec/data_migrate/migration.rb +19 -0
- data/spec/db/test.db +0 -0
- data/spec/generators/data_migration/data_migration_generator_spec.rb +27 -0
- data/spec/spec_helper.rb +5 -0
- metadata +148 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49cdd9dd0bf6956f0581db3174d7c120cdeab467
|
4
|
+
data.tar.gz: ebb746af559056f2d7f8e59bb3d8d77766c9add4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c88fab2799838783cfa4bd3fc44f33e6d90b4366a795baa1bfcee172b581bd270b7b6cad77695deaf21f2a431717b5e5904689c8a8d6c21fcfedeae8dd6c694a
|
7
|
+
data.tar.gz: a26cb2fdca59ee696f5821c48039ed8531252f543e0135bf41171a089d40a1a65578497ca0fc95b2760be4bd7816745a7ca053c2d3dfd4349d26a6188bbbb745
|
data/.rspec
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 2.0.0-p648
|
4
|
+
- 2.1.10
|
5
|
+
- 2.2.6
|
6
|
+
- 2.3.4
|
7
|
+
script: bundle exec rspec
|
8
|
+
gemfile:
|
9
|
+
- gemfiles/rails_4.0.gemfile
|
10
|
+
- gemfiles/rails_4.1.gemfile
|
11
|
+
- gemfiles/rails_4.2.gemfile
|
12
|
+
- gemfiles/rails_5.0.gemfile
|
13
|
+
matrix:
|
14
|
+
exclude:
|
15
|
+
- rvm: 2.0.0-p648
|
16
|
+
gemfile: gemfiles/rails_5.0.gemfile
|
17
|
+
- rvm: 2.1.10
|
18
|
+
gemfile: gemfiles/rails_5.0.gemfile
|
data/Appraisals
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
appraise 'rails-4.0' do
|
2
|
+
gem 'rails', '4.0.13'
|
3
|
+
end
|
4
|
+
|
5
|
+
appraise 'rails-4.1' do
|
6
|
+
gem 'rails', '4.1.16'
|
7
|
+
end
|
8
|
+
|
9
|
+
appraise 'rails-4.2' do
|
10
|
+
gem 'rails', '4.2.8'
|
11
|
+
# Nokogiri 1.7+ requires Ruby 2.1+
|
12
|
+
gem 'nokogiri', '1.6.8.1'
|
13
|
+
end
|
14
|
+
|
15
|
+
appraise 'rails-5.0' do
|
16
|
+
gem 'rails', '5.0.3'
|
17
|
+
end
|
data/Changelog.md
CHANGED
data/Gemfile.rails5
ADDED
data/README.md
CHANGED
@@ -3,6 +3,8 @@ Data Migrate
|
|
3
3
|
|
4
4
|
- [](https://rubygems.org/gems/data_migrate)
|
5
5
|
- [](http://opensource.org/licenses/MIT)
|
6
|
+
- [](https://travis-ci.org/ilyakatz/data-migrate)
|
7
|
+
|
6
8
|
|
7
9
|
Run data migrations alongside schema migrations.
|
8
10
|
|
@@ -11,8 +13,7 @@ migrations, except they should be reserved for data migrations. For
|
|
11
13
|
instance, if you realize you need to titleize all your titles, this
|
12
14
|
is the place to do it.
|
13
15
|
|
14
|
-
Why should I use this?
|
15
|
-
----------------------
|
16
|
+
# Why should I use this?
|
16
17
|
|
17
18
|
Its seems when a project hits a certain size, I get to manipulate data
|
18
19
|
outside the application itself. Changing defaults, new validations,
|
@@ -53,8 +54,7 @@ change their scripts to `db:migrate:with_data`. Of course you want to
|
|
53
54
|
test your migration, so you have the choice of `db:migrate:with_data` or
|
54
55
|
`data:migrate` to just capture that data change.
|
55
56
|
|
56
|
-
What's it do?
|
57
|
-
-------------
|
57
|
+
## What's it do?
|
58
58
|
|
59
59
|
Data migrations are stored in `db/data`. They act like schema
|
60
60
|
migrations, except they should be reserved for data migrations. For
|
@@ -63,14 +63,13 @@ is the place to do it. Running any of the provided rake tasks also
|
|
63
63
|
creates a data schema table to mirror the usual schema migrations
|
64
64
|
table to track all the goodness.
|
65
65
|
|
66
|
-
Rails Support
|
67
|
-
--------------------
|
66
|
+
## Rails Support
|
68
67
|
|
69
68
|
Rails 3.1: Version 1.2 supports Rails 3.1.0 and higher **but** is no longer maintained.
|
70
69
|
|
71
70
|
Rails 4: Version 2.0 supports Rails 4.0 and higher
|
72
71
|
|
73
|
-
Rails 5:
|
72
|
+
Rails 5.0: Supported
|
74
73
|
|
75
74
|
### Important note
|
76
75
|
|
@@ -81,8 +80,7 @@ the gem wrote data migration versions into
|
|
81
80
|
|
82
81
|
This may cause some unintended consequences. See [#22](https://github.com/ilyakatz/data-migrate/issues/22)
|
83
82
|
|
84
|
-
Installation
|
85
|
-
------------
|
83
|
+
## Installation
|
86
84
|
Add the gem to your project
|
87
85
|
|
88
86
|
# Gemfile
|
@@ -96,8 +94,7 @@ is to mirror the way the standard 'db' rake tasks work. If you've
|
|
96
94
|
installed previous to v1.1.0, you'll want to delete the
|
97
95
|
'create\_data\_migrations_table' migration.
|
98
96
|
|
99
|
-
Usage
|
100
|
-
-----
|
97
|
+
## Usage
|
101
98
|
|
102
99
|
### Generating Migrations
|
103
100
|
|
@@ -131,8 +128,7 @@ With 'up' and 'down', you can specify the option 'BOTH', which defaults to false
|
|
131
128
|
|
132
129
|
`rake db:migrate:status:with_data` provides and additional column to indicate which type of migration.
|
133
130
|
|
134
|
-
Capistrano Support
|
135
|
-
------------------
|
131
|
+
## Capistrano Support
|
136
132
|
|
137
133
|
The gem comes with a capistrano task that can be used instead of `capistrano/rails/migrations`.
|
138
134
|
|
@@ -144,9 +140,18 @@ require 'capistrano/data_migrate'
|
|
144
140
|
|
145
141
|
From now on capistrano will run `rake db:migrate:with_data` in every deploy.
|
146
142
|
|
143
|
+
### Contributing
|
144
|
+
|
145
|
+
## Testing
|
146
|
+
|
147
|
+
Run tests for a specific version of Rails
|
148
|
+
|
149
|
+
```
|
150
|
+
appraisal rails-4.2 rspec
|
151
|
+
appraisal rails-5.0 rspec
|
152
|
+
```
|
147
153
|
|
148
|
-
Thanks
|
149
|
-
------
|
154
|
+
## Thanks
|
150
155
|
[Andrew J Vargo](http://github.com/ajvargo) Andrew was the original creator and maintainer of this project!
|
151
156
|
|
152
157
|
[Jeremy Durham](http://jeremydurham.com/) for fleshing out the idea with me, and providing guidance.
|
data/data_migrate.gemspec
CHANGED
@@ -15,7 +15,16 @@ Gem::Specification.new do |s|
|
|
15
15
|
|
16
16
|
s.rubyforge_project = "data_migrate"
|
17
17
|
|
18
|
-
s.add_dependency('rails', '>= 4.0')
|
18
|
+
s.add_dependency('rails', '>= 4.0', '< 5.1')
|
19
|
+
s.add_development_dependency "appraisal"
|
20
|
+
s.add_development_dependency "rake"
|
21
|
+
s.add_development_dependency "rspec"
|
22
|
+
s.add_development_dependency "rspec-core"
|
23
|
+
s.add_development_dependency "pry"
|
24
|
+
s.add_development_dependency "rb-readline"
|
25
|
+
s.add_development_dependency "sqlite3"
|
26
|
+
s.add_development_dependency "timecop"
|
27
|
+
|
19
28
|
|
20
29
|
s.files = `git ls-files`.split("\n")
|
21
30
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
data/lib/data_migrate.rb
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), 'data_migrate', 'data_migrator')
|
2
2
|
require File.join(File.dirname(__FILE__), 'data_migrate', 'data_schema_migration')
|
3
|
-
|
3
|
+
if Rails::VERSION::MAJOR >= 5
|
4
|
+
require File.join(File.dirname(__FILE__), 'data_migrate', 'migration_five')
|
5
|
+
else
|
6
|
+
require File.join(File.dirname(__FILE__), 'data_migrate', 'migration')
|
7
|
+
end
|
4
8
|
require File.join(File.dirname(__FILE__), 'data_migrate', 'railtie')
|
@@ -16,7 +16,7 @@ module DataMigrate
|
|
16
16
|
|
17
17
|
class << self
|
18
18
|
def get_all_versions(connection = ActiveRecord::Base.connection)
|
19
|
-
if
|
19
|
+
if table_exists?(connection, schema_migrations_table_name)
|
20
20
|
# Certain versions of the gem wrote data migration versions into
|
21
21
|
# schema_migrations table. After the fix, it was corrected to write into
|
22
22
|
# data_migrations. However, not to break anything we are going to
|
@@ -41,12 +41,18 @@ module DataMigrate
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def assure_data_schema_table
|
44
|
-
|
45
|
-
ActiveRecord::Base.establish_connection(config)
|
44
|
+
ActiveRecord::Base.establish_connection(db_config)
|
46
45
|
sm_table = DataMigrate::DataMigrator.schema_migrations_table_name
|
47
46
|
|
48
|
-
unless ActiveRecord::Base.connection
|
49
|
-
|
47
|
+
unless table_exists?(ActiveRecord::Base.connection, sm_table)
|
48
|
+
create_table(sm_table)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
private
|
53
|
+
|
54
|
+
def create_table(sm_table)
|
55
|
+
ActiveRecord::Base.connection.create_table(sm_table, :id => false) do |schema_migrations_table|
|
50
56
|
schema_migrations_table.column :version, :string, :null => false
|
51
57
|
end
|
52
58
|
|
@@ -57,9 +63,22 @@ module DataMigrate
|
|
57
63
|
ActiveRecord::Base.connection.add_index sm_table, :version,
|
58
64
|
:unique => true,
|
59
65
|
:name => index_name
|
66
|
+
end
|
67
|
+
|
68
|
+
def table_exists?(connection, table_name)
|
69
|
+
# Avoid the warning that table_exists? prints in Rails 5.0 due a change in behavior between
|
70
|
+
# Rails 5.0 and Rails 5.1 of this method with respect to database views.
|
71
|
+
if ActiveRecord.version >= Gem::Version.new('5.0') && ActiveRecord.version < Gem::Version.new('5.1')
|
72
|
+
connection.data_source_exists?(table_name)
|
73
|
+
else
|
74
|
+
connection.table_exists?(schema_migrations_table_name)
|
60
75
|
end
|
61
76
|
end
|
62
77
|
|
78
|
+
def db_config
|
79
|
+
ActiveRecord::Base.configurations[Rails.env || 'development'] || ENV["DATABASE_URL"]
|
80
|
+
end
|
81
|
+
|
63
82
|
end
|
64
83
|
end
|
65
84
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module DataMigrate
|
2
|
+
class MigrationFive < ::ActiveRecord::Migration[5.0]
|
3
|
+
|
4
|
+
class << self
|
5
|
+
def check_pending!(connection = ::ActiveRecord::Base.connection)
|
6
|
+
raise ActiveRecord::PendingMigrationError if DataMigrator::Migrator.needs_migration?(connection)
|
7
|
+
end
|
8
|
+
|
9
|
+
def migrate(direction)
|
10
|
+
new.migrate direction
|
11
|
+
end
|
12
|
+
|
13
|
+
def table_name
|
14
|
+
ActiveRecord::Base.table_name_prefix + 'data_migrations' + ActiveRecord::Base.table_name_suffix
|
15
|
+
end
|
16
|
+
|
17
|
+
def index_name
|
18
|
+
"#{table_name_prefix}unique_data_migrations#{table_name_suffix}"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def initialize(name = self.class.name, version = nil)
|
23
|
+
super(name, version)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/data_migrate/railtie.rb
CHANGED
data/lib/data_migrate/version.rb
CHANGED
@@ -33,6 +33,14 @@ module DataMigrate
|
|
33
33
|
@table_name = $2.pluralize
|
34
34
|
end
|
35
35
|
end
|
36
|
+
|
37
|
+
def migration_base_class_name
|
38
|
+
if ActiveRecord.version >= Gem::Version.new('5.0')
|
39
|
+
"ActiveRecord::Migration[#{ActiveRecord::Migration.current_version}]"
|
40
|
+
else
|
41
|
+
'ActiveRecord::Migration'
|
42
|
+
end
|
43
|
+
end
|
36
44
|
end
|
37
45
|
end
|
38
46
|
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe DataMigrate::DataMigrator do
|
4
|
+
let(:subject) { DataMigrate::DataMigrator }
|
5
|
+
let(:db_config) {
|
6
|
+
{
|
7
|
+
adapter: "sqlite3",
|
8
|
+
database: "spec/db/test.db"
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
describe :assure_data_schema_table do
|
13
|
+
before do
|
14
|
+
expect(subject).to receive(:db_config) { db_config }.at_least(:once)
|
15
|
+
ActiveRecord::Base.establish_connection(db_config)
|
16
|
+
end
|
17
|
+
|
18
|
+
after do
|
19
|
+
ActiveRecord::Migration.drop_table("data_migrations")
|
20
|
+
end
|
21
|
+
|
22
|
+
it do
|
23
|
+
expect(
|
24
|
+
ActiveRecord::Base.connection.table_exists?("data_migrations")
|
25
|
+
).to eq false
|
26
|
+
subject.assure_data_schema_table
|
27
|
+
expect(
|
28
|
+
ActiveRecord::Base.connection.table_exists?("data_migrations")
|
29
|
+
).to eq true
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
describe :schema_migrations_table_name do
|
34
|
+
it "returns correct table name" do
|
35
|
+
expect(subject.schema_migrations_table_name).to eq("data_migrations")
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
describe :migrations_path do
|
40
|
+
it "returns correct migrations path" do
|
41
|
+
expect(subject.migrations_path).to eq("db/data")
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe DataMigrate::DataSchemaMigration do
|
4
|
+
let(:subject) { DataMigrate::DataSchemaMigration }
|
5
|
+
describe :table_name do
|
6
|
+
it "returns correct table name" do
|
7
|
+
expect(subject.table_name).to eq("data_migrations")
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
describe :index_name do
|
12
|
+
it "returns correct index name" do
|
13
|
+
expect(subject.index_name).to eq("unique_data_migrations")
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
if Rails::VERSION::MAJOR >= 5
|
4
|
+
subject = DataMigrate::MigrationFive
|
5
|
+
else
|
6
|
+
subject = DataMigrate::Migration
|
7
|
+
end
|
8
|
+
|
9
|
+
describe subject do
|
10
|
+
it "uses correct table name" do
|
11
|
+
expect(subject.table_name).to eq("data_migrations")
|
12
|
+
end
|
13
|
+
|
14
|
+
it "uses correct index name" do
|
15
|
+
expect(subject).to receive(:table_name_prefix) { "" }
|
16
|
+
expect(subject).to receive(:table_name_suffix) { "" }
|
17
|
+
expect(subject.index_name).to eq("unique_data_migrations")
|
18
|
+
end
|
19
|
+
end
|
data/spec/db/test.db
ADDED
Binary file
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'rails/generators'
|
3
|
+
require 'rails/generators/migration'
|
4
|
+
require 'generators/data_migration/data_migration_generator'
|
5
|
+
|
6
|
+
describe DataMigrate::Generators::DataMigrationGenerator do
|
7
|
+
let(:subject) { DataMigrate::Generators::DataMigrationGenerator }
|
8
|
+
describe :next_migration_number do
|
9
|
+
it "next migration" do
|
10
|
+
Timecop.freeze("2016-12-03 22:15:26 -0800") do
|
11
|
+
expect(ActiveRecord::Base).to receive(:timestamped_migrations) { true }
|
12
|
+
expect(subject.next_migration_number(1)).to eq("20161204061526")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
describe :migration_base_class_name do
|
18
|
+
let(:subject) { DataMigrate::Generators::DataMigrationGenerator.new(['my_migration']) }
|
19
|
+
it "returns the correct base class name" do
|
20
|
+
if ActiveRecord.version >= Gem::Version.new('5.0')
|
21
|
+
expect(subject.send(:migration_base_class_name)).to eq("ActiveRecord::Migration[#{ActiveRecord::Migration.current_version}]")
|
22
|
+
else
|
23
|
+
expect(subject.send(:migration_base_class_name)).to eq('ActiveRecord::Migration')
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: data_migrate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew J Vargo
|
@@ -9,22 +9,140 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-06-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - '>='
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '4.0'
|
21
|
+
- - <
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '5.1'
|
21
24
|
type: :runtime
|
22
25
|
prerelease: false
|
23
26
|
version_requirements: !ruby/object:Gem::Requirement
|
24
27
|
requirements:
|
25
|
-
- -
|
28
|
+
- - '>='
|
26
29
|
- !ruby/object:Gem::Version
|
27
30
|
version: '4.0'
|
31
|
+
- - <
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '5.1'
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: appraisal
|
36
|
+
requirement: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
type: :development
|
42
|
+
prerelease: false
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: rake
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rspec
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
type: :development
|
70
|
+
prerelease: false
|
71
|
+
version_requirements: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: rspec-core
|
78
|
+
requirement: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
type: :development
|
84
|
+
prerelease: false
|
85
|
+
version_requirements: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
- !ruby/object:Gem::Dependency
|
91
|
+
name: pry
|
92
|
+
requirement: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
type: :development
|
98
|
+
prerelease: false
|
99
|
+
version_requirements: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
- !ruby/object:Gem::Dependency
|
105
|
+
name: rb-readline
|
106
|
+
requirement: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
type: :development
|
112
|
+
prerelease: false
|
113
|
+
version_requirements: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
- !ruby/object:Gem::Dependency
|
119
|
+
name: sqlite3
|
120
|
+
requirement: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
type: :development
|
126
|
+
prerelease: false
|
127
|
+
version_requirements: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
- !ruby/object:Gem::Dependency
|
133
|
+
name: timecop
|
134
|
+
requirement: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
type: :development
|
140
|
+
prerelease: false
|
141
|
+
version_requirements: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '>='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
28
146
|
description: Rake tasks to migrate data alongside schema changes.
|
29
147
|
email:
|
30
148
|
- ajvargo@computer.org
|
@@ -33,25 +151,40 @@ executables: []
|
|
33
151
|
extensions: []
|
34
152
|
extra_rdoc_files: []
|
35
153
|
files:
|
36
|
-
-
|
154
|
+
- .gitignore
|
155
|
+
- .rspec
|
156
|
+
- .travis.yml
|
157
|
+
- Appraisals
|
37
158
|
- Changelog.md
|
38
159
|
- Gemfile
|
160
|
+
- Gemfile.rails5
|
39
161
|
- LICENSE
|
40
162
|
- README.md
|
41
163
|
- Rakefile
|
42
164
|
- data_migrate.gemspec
|
165
|
+
- gemfiles/rails_4.0.gemfile
|
166
|
+
- gemfiles/rails_4.1.gemfile
|
167
|
+
- gemfiles/rails_4.2.gemfile
|
168
|
+
- gemfiles/rails_5.0.gemfile
|
43
169
|
- lib/capistrano/data_migrate.rb
|
44
170
|
- lib/capistrano/data_migrate/migrate.rb
|
45
171
|
- lib/data_migrate.rb
|
46
172
|
- lib/data_migrate/data_migrator.rb
|
47
173
|
- lib/data_migrate/data_schema_migration.rb
|
48
174
|
- lib/data_migrate/migration.rb
|
175
|
+
- lib/data_migrate/migration_five.rb
|
49
176
|
- lib/data_migrate/railtie.rb
|
50
177
|
- lib/data_migrate/version.rb
|
51
178
|
- lib/generators/data_migrate.rb
|
52
179
|
- lib/generators/data_migration/data_migration_generator.rb
|
53
180
|
- lib/generators/data_migration/templates/data_migration.rb
|
54
181
|
- lib/generators/data_migration/templates/migration.rb
|
182
|
+
- spec/data_migrate/data_migrator_spec.rb
|
183
|
+
- spec/data_migrate/data_schema_migration_spec.rb
|
184
|
+
- spec/data_migrate/migration.rb
|
185
|
+
- spec/db/test.db
|
186
|
+
- spec/generators/data_migration/data_migration_generator_spec.rb
|
187
|
+
- spec/spec_helper.rb
|
55
188
|
- tasks/.gitkeep
|
56
189
|
- tasks/databases.rake
|
57
190
|
homepage: https://github.com/ilyakatz/data-migrate
|
@@ -67,18 +200,24 @@ require_paths:
|
|
67
200
|
- lib
|
68
201
|
required_ruby_version: !ruby/object:Gem::Requirement
|
69
202
|
requirements:
|
70
|
-
- -
|
203
|
+
- - '>='
|
71
204
|
- !ruby/object:Gem::Version
|
72
205
|
version: '0'
|
73
206
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
207
|
requirements:
|
75
|
-
- -
|
208
|
+
- - '>='
|
76
209
|
- !ruby/object:Gem::Version
|
77
210
|
version: '0'
|
78
211
|
requirements: []
|
79
212
|
rubyforge_project: data_migrate
|
80
|
-
rubygems_version: 2.
|
213
|
+
rubygems_version: 2.0.14.1
|
81
214
|
signing_key:
|
82
215
|
specification_version: 4
|
83
216
|
summary: Rake tasks to migrate data alongside schema changes.
|
84
|
-
test_files:
|
217
|
+
test_files:
|
218
|
+
- spec/data_migrate/data_migrator_spec.rb
|
219
|
+
- spec/data_migrate/data_schema_migration_spec.rb
|
220
|
+
- spec/data_migrate/migration.rb
|
221
|
+
- spec/db/test.db
|
222
|
+
- spec/generators/data_migration/data_migration_generator_spec.rb
|
223
|
+
- spec/spec_helper.rb
|