sbf-dm-migrations 1.3.0 → 1.4.0.beta.1

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
2
  SHA256:
3
- metadata.gz: 33a37e321f631bd96554ab95d0afabaf407434d08b51bc0e8c5e4361bcb1e57a
4
- data.tar.gz: af191fa57b64f1c3e9a11d691f2db79115990ccf19380d032a5abcfc154e2f25
3
+ metadata.gz: 30e98a3dafb7ad1913e8f4c82eca94664297ee79501a022c4cadcb6290ccd6c3
4
+ data.tar.gz: 6badd9bd941de3b476c19a755a621c262562cceb268522ae13e26f618f9f7514
5
5
  SHA512:
6
- metadata.gz: 10b2d82636c2867d0a1e3fa405889876948bd9ad96fba98710fb1f259f7eb70bf769837435af84d237bda5bb3aca5180252e010bb801c53a37c0ac116ca42c6b
7
- data.tar.gz: ea7832e0547fc70703bfed72b04a6edc29be569609ff4d1ffb9ecce6e4b7f11853b11aab2a7a68fa77326bb97f3f275faed6b889ba4299d21cb389b2f57639dc
6
+ metadata.gz: f10fac0dba99654d931f6dfd37700816c3425ccc115abfd7db511b391771f8719722efe2017a2173180e41d40c15eb7c9f619b2424dc8052d8f40c7c8a1c4f56
7
+ data.tar.gz: a0c0c7eb4233ce7abb33ed98b42e0cae1fe023b73bc70278afca91d350d62a8481ebd16ec0a3a9b01576173c662ae3402e16bf30f753c84fc9c0526470c71234
@@ -14,12 +14,12 @@ module DataMapper
14
14
 
15
15
  # @api semipublic
16
16
  def storage_exists?(storage_name)
17
- table_info(storage_name).any?
17
+ SQL.table_info(storage_name).any?
18
18
  end
19
19
 
20
20
  # @api semipublic
21
21
  def field_exists?(storage_name, column_name)
22
- table_info(storage_name).any? do |row|
22
+ SQL.table_info(storage_name).any? do |row|
23
23
  row.name == column_name
24
24
  end
25
25
  end
@@ -28,22 +28,22 @@ module DataMapper
28
28
  # private ## This cannot be private for current migrations
29
29
 
30
30
  # @api private
31
- def supports_serial?
31
+ def self.supports_serial?
32
32
  @supports_serial ||= sqlite_version >= '3.1.0'
33
33
  end
34
34
 
35
35
  # @api private
36
- def supports_drop_table_if_exists?
36
+ def self.supports_drop_table_if_exists?
37
37
  @supports_drop_table_if_exists ||= sqlite_version >= '3.3.0'
38
38
  end
39
39
 
40
40
  # @api private
41
- def table_info(table_name)
41
+ def self.table_info(table_name)
42
42
  select("PRAGMA table_info(#{quote_name(table_name)})")
43
43
  end
44
44
 
45
45
  # @api private
46
- def create_table_statement(connection, model, properties)
46
+ def self.create_table_statement(connection, model, properties)
47
47
  statement = DataMapper::Ext::String.compress_lines(<<-SQL)
48
48
  CREATE TABLE #{quote_name(model.storage_name(name))}
49
49
  (#{properties.map { |property| property_schema_statement(connection, property_schema_hash(property)) }.join(', ')}
@@ -59,7 +59,7 @@ module DataMapper
59
59
  end
60
60
 
61
61
  # @api private
62
- def property_schema_statement(connection, schema)
62
+ def self.property_schema_statement(connection, schema)
63
63
  statement = super
64
64
 
65
65
  statement << ' PRIMARY KEY AUTOINCREMENT' if supports_serial? && schema[:serial]
@@ -68,7 +68,7 @@ module DataMapper
68
68
  end
69
69
 
70
70
  # @api private
71
- def sqlite_version
71
+ def self.sqlite_version
72
72
  @sqlite_version ||= select('SELECT sqlite_version(*)').first.freeze
73
73
  end
74
74
  end
@@ -1,5 +1,5 @@
1
1
  module DataMapper
2
2
  module Migrations
3
- VERSION = '1.3.0'.freeze
3
+ VERSION = '1.4.0.beta.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sbf-dm-migrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - opensource_firespring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-12 00:00:00.000000000 Z
11
+ date: 2024-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sbf-dm-core
@@ -110,9 +110,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
110
  version: 2.7.8
111
111
  required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  requirements:
113
- - - ">="
113
+ - - ">"
114
114
  - !ruby/object:Gem::Version
115
- version: '0'
115
+ version: 1.3.1
116
116
  requirements: []
117
117
  rubygems_version: 3.4.10
118
118
  signing_key: