dynamic_migrations 3.2.0 → 3.2.2
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/CHANGELOG.md +15 -0
- data/lib/dynamic_migrations/postgres/generator/column.rb +10 -3
- data/lib/dynamic_migrations/postgres/server/database/schema/function.rb +2 -1
- data/lib/dynamic_migrations/postgres/server/database/schema/table/column.rb +2 -1
- data/lib/dynamic_migrations/postgres/server/database/schema/table/foreign_key_constraint.rb +2 -1
- data/lib/dynamic_migrations/postgres/server/database/schema/table/index.rb +2 -1
- data/lib/dynamic_migrations/postgres/server/database/schema/table/primary_key.rb +2 -1
- data/lib/dynamic_migrations/postgres/server/database/schema/table/trigger.rb +2 -1
- data/lib/dynamic_migrations/postgres/server/database/schema/table/unique_constraint.rb +2 -1
- data/lib/dynamic_migrations/postgres/server/database/schema/table/validation.rb +3 -2
- data/lib/dynamic_migrations/postgres/server/database/schema/table.rb +2 -1
- data/lib/dynamic_migrations/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8f9a1a4cf3316579443b0fed7898a42ab410ba114d194c5ffb874a5ca5027d9
|
4
|
+
data.tar.gz: 03651b7187cef799edee4d64e9c7533f0c6fb9ce0f9193b16e721c13e508373b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfdbf88d363b8280f18d1aa63cc7ad9d917de7d5c0582ae43a02ac9341af4c00918f6cd5382c935c2a1a1026873afdd98e2aed42397a722b8660fb876133408a
|
7
|
+
data.tar.gz: 35451e4c7cfbcfa0a7dec0133b726d005c32ff4c1d7d2792737f24b4b7c2da98b0ba50250f30876f99743d16b911201243d0a0252f162794ec6a08e1955cc634
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [3.2.2](https://github.com/craigulliott/dynamic_migrations/compare/v3.2.1...v3.2.2) (2023-08-17)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* automatically strip whitespace off validation check_clause ([f7a3b91](https://github.com/craigulliott/dynamic_migrations/commit/f7a3b91e694db83a5aefcd25e50985c05aaf97e2))
|
9
|
+
|
10
|
+
## [3.2.1](https://github.com/craigulliott/dynamic_migrations/compare/v3.2.0...v3.2.1) (2023-08-17)
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* making column descriptions optional ([c384225](https://github.com/craigulliott/dynamic_migrations/commit/c3842254841c677efb777a1beb519754a4e85cc1))
|
16
|
+
* trimming object descriptions when saving ([c384225](https://github.com/craigulliott/dynamic_migrations/commit/c3842254841c677efb777a1beb519754a4e85cc1))
|
17
|
+
|
3
18
|
## [3.2.0](https://github.com/craigulliott/dynamic_migrations/compare/v3.1.1...v3.2.0) (2023-08-16)
|
4
19
|
|
5
20
|
|
@@ -21,6 +21,15 @@ module DynamicMigrations
|
|
21
21
|
options[:array] = true
|
22
22
|
end
|
23
23
|
|
24
|
+
# comment has to be last
|
25
|
+
if column.description
|
26
|
+
options[:comment] = <<~RUBY
|
27
|
+
<<~COMMENT
|
28
|
+
#{indent column.description}
|
29
|
+
COMMENT
|
30
|
+
RUBY
|
31
|
+
end
|
32
|
+
|
24
33
|
options_syntax = options.map { |k, v| "#{k}: #{v}" }.join(", ")
|
25
34
|
|
26
35
|
data_type = column.data_type
|
@@ -34,9 +43,7 @@ module DynamicMigrations
|
|
34
43
|
object: column,
|
35
44
|
code_comment: code_comment,
|
36
45
|
migration: <<~RUBY
|
37
|
-
add_column :#{column.table.name}, :#{column.name}, :#{data_type}, #{options_syntax}
|
38
|
-
#{indent column.description}
|
39
|
-
COMMENT
|
46
|
+
add_column :#{column.table.name}, :#{column.name}, :#{data_type}, #{options_syntax}
|
40
47
|
RUBY
|
41
48
|
end
|
42
49
|
|
@@ -34,7 +34,8 @@ module DynamicMigrations
|
|
34
34
|
|
35
35
|
unless description.nil?
|
36
36
|
raise ExpectedStringError, description unless description.is_a? String
|
37
|
-
@description = description
|
37
|
+
@description = description.strip
|
38
|
+
@description = nil if description == ""
|
38
39
|
end
|
39
40
|
|
40
41
|
@interval_type = interval_type
|
@@ -72,7 +72,8 @@ module DynamicMigrations
|
|
72
72
|
|
73
73
|
unless description.nil?
|
74
74
|
raise ExpectedStringError, description unless description.is_a? String
|
75
|
-
@description = description
|
75
|
+
@description = description.strip
|
76
|
+
@description = nil if description == ""
|
76
77
|
end
|
77
78
|
|
78
79
|
raise ExpectedBooleanError, deferrable unless [true, false].include?(deferrable)
|
@@ -61,7 +61,8 @@ module DynamicMigrations
|
|
61
61
|
|
62
62
|
unless description.nil?
|
63
63
|
raise ExpectedStringError, description unless description.is_a? String
|
64
|
-
@description = description
|
64
|
+
@description = description.strip
|
65
|
+
@description = nil if description == ""
|
65
66
|
end
|
66
67
|
|
67
68
|
raise ExpectedBooleanError, unique unless [true, false].include?(unique)
|
@@ -115,7 +115,8 @@ module DynamicMigrations
|
|
115
115
|
|
116
116
|
unless description.nil?
|
117
117
|
raise ExpectedStringError, description unless description.is_a? String
|
118
|
-
@description = description
|
118
|
+
@description = description.strip
|
119
|
+
@description = nil if description == ""
|
119
120
|
end
|
120
121
|
end
|
121
122
|
|
@@ -50,7 +50,8 @@ module DynamicMigrations
|
|
50
50
|
|
51
51
|
unless description.nil?
|
52
52
|
raise ExpectedStringError, description unless description.is_a? String
|
53
|
-
@description = description
|
53
|
+
@description = description.strip
|
54
|
+
@description = nil if description == ""
|
54
55
|
end
|
55
56
|
|
56
57
|
raise ExpectedBooleanError, deferrable unless [true, false].include?(deferrable)
|
@@ -44,11 +44,12 @@ module DynamicMigrations
|
|
44
44
|
@name = name
|
45
45
|
|
46
46
|
raise ExpectedStringError, check_clause unless check_clause.is_a? String
|
47
|
-
@check_clause = check_clause
|
47
|
+
@check_clause = check_clause.strip
|
48
48
|
|
49
49
|
unless description.nil?
|
50
50
|
raise ExpectedStringError, description unless description.is_a? String
|
51
|
-
@description = description
|
51
|
+
@description = description.strip
|
52
|
+
@description = nil if description == ""
|
52
53
|
end
|
53
54
|
|
54
55
|
raise ExpectedBooleanError, deferrable unless [true, false].include?(deferrable)
|
@@ -39,7 +39,8 @@ module DynamicMigrations
|
|
39
39
|
|
40
40
|
unless description.nil?
|
41
41
|
raise ExpectedStringError, description unless description.is_a? String
|
42
|
-
@description = description
|
42
|
+
@description = description.strip
|
43
|
+
@description = nil if description == ""
|
43
44
|
end
|
44
45
|
|
45
46
|
@columns = {}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamic_migrations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Craig Ulliott
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|