sbf-dm-migrations 1.3.0.beta → 1.4.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/dm-migrations.gemspec +3 -3
- data/lib/dm-migrations/adapters/dm-sqlite-adapter.rb +8 -8
- data/lib/dm-migrations/version.rb +1 -1
- data/tasks/release.rake +6 -0
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30e98a3dafb7ad1913e8f4c82eca94664297ee79501a022c4cadcb6290ccd6c3
|
4
|
+
data.tar.gz: 6badd9bd941de3b476c19a755a621c262562cceb268522ae13e26f618f9f7514
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f10fac0dba99654d931f6dfd37700816c3425ccc115abfd7db511b391771f8719722efe2017a2173180e41d40c15eb7c9f619b2424dc8052d8f40c7c8a1c4f56
|
7
|
+
data.tar.gz: a0c0c7eb4233ce7abb33ed98b42e0cae1fe023b73bc70278afca91d350d62a8481ebd16ec0a3a9b01576173c662ae3402e16bf30f753c84fc9c0526470c71234
|
data/Gemfile
CHANGED
@@ -5,8 +5,8 @@ gemspec
|
|
5
5
|
SOURCE = ENV.fetch('SOURCE', :git).to_sym
|
6
6
|
REPO_POSTFIX = (SOURCE == :path) ? '' : '.git'
|
7
7
|
DATAMAPPER = (SOURCE == :path) ? Pathname(__FILE__).dirname.parent : 'https://github.com/firespring'
|
8
|
-
DM_VERSION = '~> 1.3.0
|
9
|
-
DO_VERSION = '~> 0.
|
8
|
+
DM_VERSION = '~> 1.3.0'.freeze
|
9
|
+
DO_VERSION = '~> 0.11.0'.freeze
|
10
10
|
DM_DO_ADAPTERS = %w(sqlite postgres mysql oracle sqlserver).freeze
|
11
11
|
CURRENT_BRANCH = ENV.fetch('GIT_BRANCH', 'master')
|
12
12
|
|
data/dm-migrations.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require File.expand_path('../lib/dm-migrations/version', __FILE__)
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
|
-
gem.authors = ['
|
5
|
-
gem.email = ['
|
4
|
+
gem.authors = ['opensource_firespring']
|
5
|
+
gem.email = ['opensource@firespring.com']
|
6
6
|
gem.summary = 'DataMapper plugin for writing and spec-ing migrations'
|
7
7
|
gem.description = 'DataMapper plugin for modifying and maintaining database structure, triggers, stored procedures, and data'
|
8
8
|
gem.homepage = 'https://datamapper.org'
|
@@ -16,5 +16,5 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.version = DataMapper::Migrations::VERSION
|
17
17
|
gem.required_ruby_version = '>= 2.7.8'
|
18
18
|
|
19
|
-
gem.add_runtime_dependency('sbf-dm-core', '~> 1.3.0
|
19
|
+
gem.add_runtime_dependency('sbf-dm-core', '~> 1.3.0')
|
20
20
|
end
|
@@ -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
|
data/tasks/release.rake
ADDED
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.
|
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
|
+
date: 2024-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sbf-dm-core
|
@@ -16,18 +16,18 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.3.0
|
19
|
+
version: 1.3.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.3.0
|
26
|
+
version: 1.3.0
|
27
27
|
description: DataMapper plugin for modifying and maintaining database structure, triggers,
|
28
28
|
stored procedures, and data
|
29
29
|
email:
|
30
|
-
-
|
30
|
+
- opensource@firespring.com
|
31
31
|
executables: []
|
32
32
|
extensions: []
|
33
33
|
extra_rdoc_files:
|
@@ -91,6 +91,7 @@ files:
|
|
91
91
|
- spec/unit/sql/table_modifier_spec.rb
|
92
92
|
- spec/unit/sql/table_spec.rb
|
93
93
|
- spec/unit/sql_spec.rb
|
94
|
+
- tasks/release.rake
|
94
95
|
- tasks/spec.rake
|
95
96
|
- tasks/yard.rake
|
96
97
|
- tasks/yardstick.rake
|