dynamic_migrations 3.5.0 → 3.5.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c2370c3373cb04ce64f20e48f15adf1f68cbacf17de79ca420f39f67c13536aa
4
- data.tar.gz: 0d8d19007406180972f5a6304c01c0277079920bb8190705f2a246ef0975167a
3
+ metadata.gz: 10d870837ddf3e4c71fa66f94012de4633865cb026e18ad436427439d670a1e5
4
+ data.tar.gz: fc9a1eb789cce002adb18b08132de5618aa04b6effcb50ac4c2bd032594eaee1
5
5
  SHA512:
6
- metadata.gz: de27b281b3e4494cfa5b3cc3835da3e71816c4a3b3e75bc92d96e2b69ae7e6169d9b32ebadc53c0f5e25d44378e81f46b26cc9db8cfb9c7bf97d009e4fc3eb3d
7
- data.tar.gz: 79e609f4d4ce4272a8f82e4d11771faa05c9c380228e2587a96abb751fd9647d55f65f91e730ec0487ddc349cc6922f2e079782bcd355c17335a8f8d4c68caa7
6
+ metadata.gz: 6e0b1524b32ae7e2095a158914a230386e0b31cfdfb93c57aaf98775972501d3b11460cc96094abaee3a673abebdd2cdb5416ad7c921b4b33d2d0173fbf91dd1
7
+ data.tar.gz: '0669156389241de166d9ae906180a87fa6f286677463bcbfec4323e1cc7f2e01675a10b1057a48341efce2f338011b6ae2fce83e66de4ff2eacf6bb61f120fd7'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.5.1](https://github.com/craigulliott/dynamic_migrations/compare/v3.5.0...v3.5.1) (2023-09-11)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * missing primary key should be represented by nil when building differences, and added some more descriptive error messages ([491c1c2](https://github.com/craigulliott/dynamic_migrations/commit/491c1c2d7c2128f3f4ad3f2a21b0b52c67029185))
9
+
3
10
  ## [3.5.0](https://github.com/craigulliott/dynamic_migrations/compare/v3.4.1...v3.5.0) (2023-09-11)
4
11
 
5
12
 
@@ -92,7 +92,7 @@ module DynamicMigrations
92
92
  description = column.description
93
93
 
94
94
  if description.nil?
95
- raise MissingDescriptionError
95
+ raise MissingDescriptionError, "Missing required description for column `#{column.name}` in table `#{column.table.schema.name}.#{column.table.name}`"
96
96
  end
97
97
 
98
98
  add_fragment schema: column.table.schema,
@@ -73,7 +73,7 @@ module DynamicMigrations
73
73
  description = foreign_key_constraint.description
74
74
 
75
75
  if description.nil?
76
- raise MissingDescriptionError
76
+ raise MissingDescriptionError, "Missing required description for foreign_key_constraint `#{foreign_key_constraint.name}` in table `#{foreign_key_constraint.table.schema.name}.#{foreign_key_constraint.table.name}`"
77
77
  end
78
78
 
79
79
  add_fragment schema: foreign_key_constraint.table.schema,
@@ -89,7 +89,7 @@ module DynamicMigrations
89
89
  description = index.description
90
90
 
91
91
  if description.nil?
92
- raise MissingDescriptionError
92
+ raise MissingDescriptionError, "Missing required description for index `#{index.name}` in table `#{index.table.schema.name}.#{index.table.name}`"
93
93
  end
94
94
 
95
95
  add_fragment schema: index.table.schema,
@@ -44,7 +44,7 @@ module DynamicMigrations
44
44
  description = table.description
45
45
 
46
46
  if description.nil?
47
- raise MissingDescriptionError
47
+ raise MissingDescriptionError, "Missing required description for table `#{table.schema.name}.#{table.name}`"
48
48
  end
49
49
 
50
50
  add_fragment schema: table.schema,
@@ -93,7 +93,7 @@ module DynamicMigrations
93
93
  description = trigger.description
94
94
 
95
95
  if description.nil?
96
- raise MissingDescriptionError
96
+ raise MissingDescriptionError, "Missing required description for trigger `#{trigger.name}` on table `#{trigger.table.schema.name}.#{trigger.table.name}`"
97
97
  end
98
98
 
99
99
  add_fragment schema: trigger.table.schema,
@@ -67,7 +67,7 @@ module DynamicMigrations
67
67
  description = unique_constraint.description
68
68
 
69
69
  if description.nil?
70
- raise MissingDescriptionError
70
+ raise MissingDescriptionError, "Missing required description for unique_constraint `#{unique_constraint.name}` in table `#{unique_constraint.table.schema.name}.#{unique_constraint.table.name}`"
71
71
  end
72
72
 
73
73
  add_fragment schema: unique_constraint.table.schema,
@@ -75,7 +75,7 @@ module DynamicMigrations
75
75
  description = validation.description
76
76
 
77
77
  if description.nil?
78
- raise MissingDescriptionError
78
+ raise MissingDescriptionError, "Missing required description for validation `#{validation.name}` in table `#{validation.table.schema.name}.#{validation.table.name}`"
79
79
  end
80
80
 
81
81
  add_fragment schema: validation.table.schema,
@@ -136,7 +136,7 @@ module DynamicMigrations
136
136
  comparison_foreign_key_constraints = comparison_table.foreign_key_constraints_hash
137
137
  comparison_unique_constraints = comparison_table.unique_constraints_hash
138
138
  else
139
- comparison_primary_key = {}
139
+ comparison_primary_key = nil
140
140
  comparison_columns = {}
141
141
  comparison_indexes = {}
142
142
  comparison_triggers = {}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DynamicMigrations
4
- VERSION = "3.5.0"
4
+ VERSION = "3.5.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamic_migrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Craig Ulliott