rails-data-migrations 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Appraisals +4 -0
- data/lib/rails_data_migrations/migrator.rb +6 -1
- data/lib/rails_data_migrations/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41b028d0c6c92f01479fd78f09b05a3a0b0a61f0
|
4
|
+
data.tar.gz: 942f98d4bbe3d11559b5028101ff9502828ed4c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bad66e756d20288721fc21ad52171484f1680f16832f6bb6c06bcabf8af65802d7df28274bccf9389821daaee9fa91585f7d773a9819a71fd55487bd1a595d19
|
7
|
+
data.tar.gz: f9ec2ff89c5f23a9f6bc72d13b762e1668283d812992a56a541b5370df04cbb7840e7d943b0110d4017ed469fe1bbbfcc9366fbc078e37918ffd8eef4223fc63
|
data/Appraisals
CHANGED
@@ -12,8 +12,13 @@ module RailsDataMigrations
|
|
12
12
|
end
|
13
13
|
|
14
14
|
class << self
|
15
|
+
def migrations_table_exists?(connection = ActiveRecord::Base.connection)
|
16
|
+
table_check_method = connection.respond_to?(:data_source_exists?) ? :data_source_exists? : :table_exists?
|
17
|
+
connection.send(table_check_method, schema_migrations_table_name)
|
18
|
+
end
|
19
|
+
|
15
20
|
def get_all_versions(connection = ActiveRecord::Base.connection)
|
16
|
-
if
|
21
|
+
if migrations_table_exists?(connection)
|
17
22
|
LogEntry.all.map { |x| x.version.to_i }.sort
|
18
23
|
else
|
19
24
|
[]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-data-migrations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Glukhov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|