rake-task-migration 1.0.2 → 1.1.0.pre.beta
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ead5f08c9249b377ec9833107b3ed8e4c4a99350ad94d1aa303223c34baed66f
|
4
|
+
data.tar.gz: a8101a739303d711e606fa61da91935a93621de84f0ecf3a0e8528a0356377c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0384d0b01710df6a50d218ae753fdb1ee064c231735131401e54054ebe6d89eda36f728589a56164dc446d2e587d80ec7d017aceccd816b05904eedc681c4d10'
|
7
|
+
data.tar.gz: 1d0ef372a16a572e6b75f88097052e6737a6991c892a92248c86f46869f855a3fc7f0c8723c2ae34ed069e48136041b89fb539512ee8285ae0bc0089fc60ec08
|
data/README.md
CHANGED
@@ -42,7 +42,7 @@ namespace :migrations do
|
|
42
42
|
end
|
43
43
|
```
|
44
44
|
|
45
|
-
Then run the migration
|
45
|
+
Then run the migration task:
|
46
46
|
|
47
47
|
```
|
48
48
|
$ bundle exec rake tasks:migrate
|
@@ -76,6 +76,7 @@ end
|
|
76
76
|
|
77
77
|
```bash
|
78
78
|
export RAILS_ENV=test
|
79
|
+
export DB=mysql # or sqlite, postgresql
|
79
80
|
bundle exec rake app:db:create app:db:migrate
|
80
81
|
bundle exec rspec spec
|
81
82
|
```
|
data/lib/rake/task_migration.rb
CHANGED
@@ -11,10 +11,10 @@ module Rake
|
|
11
11
|
DEFAULT_NAMESPACE = :migrations
|
12
12
|
|
13
13
|
mattr_accessor :migration_table_name
|
14
|
-
|
14
|
+
self.migration_table_name = DEFAULT_TABLE_NAME
|
15
15
|
|
16
16
|
mattr_accessor :migration_namespace
|
17
|
-
|
17
|
+
self.migration_namespace = DEFAULT_NAMESPACE
|
18
18
|
|
19
19
|
class << self
|
20
20
|
def config
|
@@ -6,18 +6,8 @@ module Rake
|
|
6
6
|
new(tasks).migrate
|
7
7
|
end
|
8
8
|
|
9
|
-
def
|
10
|
-
|
11
|
-
end
|
12
|
-
|
13
|
-
def get_all_tasks(connection = ActiveRecord::Base.connection)
|
14
|
-
ActiveSupport::Deprecation.silence do
|
15
|
-
if connection.table_exists?(rake_task_migrations_table_name)
|
16
|
-
RakeTaskMigration.all.map { |x| x.version.to_s }.sort
|
17
|
-
else
|
18
|
-
[]
|
19
|
-
end
|
20
|
-
end
|
9
|
+
def get_all_tasks
|
10
|
+
RakeTaskMigration.all.map { |x| x.version.to_s }.sort
|
21
11
|
end
|
22
12
|
end
|
23
13
|
|
@@ -48,11 +38,7 @@ module Rake
|
|
48
38
|
migration.version = task
|
49
39
|
migration.runtime = time.real.to_i
|
50
40
|
migration.migrated_on = DateTime.now
|
51
|
-
|
52
|
-
migration.save!
|
53
|
-
rescue StandardError => e
|
54
|
-
puts e
|
55
|
-
end
|
41
|
+
migration.save!
|
56
42
|
|
57
43
|
announce "#{task}: migrated (#{format('%.4fs', time.real)})"
|
58
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake-task-migration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.1.0.pre.beta
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Zaccari
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -17,9 +17,6 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.2'
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '6'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,9 +24,6 @@ dependencies:
|
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '3.2'
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '6'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: test-unit
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,14 +72,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
78
72
|
version: '0'
|
79
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
74
|
requirements:
|
81
|
-
- - "
|
75
|
+
- - ">"
|
82
76
|
- !ruby/object:Gem::Version
|
83
|
-
version:
|
77
|
+
version: 1.3.1
|
84
78
|
requirements: []
|
85
|
-
|
86
|
-
rubygems_version: 2.4.5.1
|
79
|
+
rubygems_version: 3.0.4
|
87
80
|
signing_key:
|
88
81
|
specification_version: 4
|
89
82
|
summary: Rake Task Migrations
|
90
83
|
test_files: []
|
91
|
-
has_rdoc:
|