dynamic_migrations 3.6.1 → 3.6.2

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: a5f6a69d0ef49c88c5d4f7d1f3798e6a4272fccdad5e3e1c2f5887cf43e552a9
4
- data.tar.gz: c3faf73058b222ac2a7b10006022d8a08e8b311efad48481f3b64e204b0b3c33
3
+ metadata.gz: 5a237bb66c7567c302f4f01ada5c06be36187234cd430da63a753eac9c3c0320
4
+ data.tar.gz: ab87c5f523b6a682a4e6b648b050e609fe1bfca14bcf1fdebd813b04a5f5091b
5
5
  SHA512:
6
- metadata.gz: 1be6d466691eaf92f8b999de32a400cb1e14067618cb9ffe429275110675a516aa2797bc3368ce1d0a4aa66d4021044555cc2e54cb31d1a7290f89b72ae93ce4
7
- data.tar.gz: 851125f34e2df74a7457d620372321a011459777a30543775eebdda6fcaf7c0cfe5b66e41b1c118bf4d6a029c4f99c8f99150032fa03fc97c18fa3656cd84c54
6
+ metadata.gz: 94080c180556da70c9bba292ec6de10de980ed95ff71705c14b320a56b507eae50cccbc1654354184406bce6386b03bde27afdae2615c8060818f8ab5f876bc1
7
+ data.tar.gz: e1800b2c149556be65affbf35321abd7f50282efe54dcb33af379cc24ea493c7c72663eff1b7e4379eef4ac8eb852b5a36f8532f844ebc7eadb6784b495e62ff
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.6.2](https://github.com/craigulliott/dynamic_migrations/compare/v3.6.1...v3.6.2) (2023-09-13)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * don't generate columns separately for migrations if also generating the table (as they are already included in the table definition) ([b6f748c](https://github.com/craigulliott/dynamic_migrations/commit/b6f748c8e72aaab12d32243f6a007d03707041da))
9
+
3
10
  ## [3.6.1](https://github.com/craigulliott/dynamic_migrations/compare/v3.6.0...v3.6.1) (2023-09-13)
4
11
 
5
12
 
@@ -26,7 +26,7 @@ module DynamicMigrations
26
26
 
27
27
  # we process everything else after we create the table, because the other
28
28
  # database objects are dependent on the table
29
- process_dependents schema_name, table_name, configuration_table, {}
29
+ process_dependents schema_name, table_name, configuration_table, {}, skip_columns: true
30
30
 
31
31
  # If the schema exists in the database but not in the configuration
32
32
  # then we need to delete it.
@@ -60,8 +60,11 @@ module DynamicMigrations
60
60
  end
61
61
  end
62
62
 
63
- def process_dependents schema_name, table_name, configuration_table, database_table
64
- process_columns schema_name, table_name, configuration_table[:columns] || {}, database_table[:columns] || {}
63
+ def process_dependents schema_name, table_name, configuration_table, database_table, skip_columns: false
64
+ # we skip columns if we are processing the table for the first time, as they are processed within the table creation
65
+ unless skip_columns
66
+ process_columns schema_name, table_name, configuration_table[:columns] || {}, database_table[:columns] || {}
67
+ end
65
68
  process_foreign_key_constraints schema_name, table_name, configuration_table[:foreign_key_constraints] || {}, database_table[:foreign_key_constraints] || {}
66
69
  process_indexes schema_name, table_name, configuration_table[:indexes] || {}, database_table[:indexes] || {}
67
70
  process_triggers schema_name, table_name, configuration_table[:triggers] || {}, database_table[:triggers] || {}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DynamicMigrations
4
- VERSION = "3.6.1"
4
+ VERSION = "3.6.2"
5
5
  end
@@ -14,7 +14,7 @@ module DynamicMigrations
14
14
  def process_tables: (Symbol schema_name, untyped configuration_tables, untyped database_tables) -> void
15
15
  def process_table: (Symbol schema_name, Symbol table_name, untyped configuration_table, untyped database_table) -> void
16
16
  # this method comes from the Columns module
17
- def process_dependents: (Symbol schema_name, Symbol table_name, untyped configuration_columns, untyped database_columns) -> void
17
+ def process_dependents: (Symbol schema_name, Symbol table_name, untyped configuration_columns, untyped database_columns, ?skip_columns: bool) -> void
18
18
  def process_columns: (Symbol schema_name, Symbol table_name, untyped configuration_columns, untyped database_columns) -> void
19
19
  def process_foreign_key_constraints: (Symbol schema_name, Symbol table_name, untyped configuration_foreign_key_constraints, untyped database_foreign_key_constraints) -> void
20
20
  def process_indexes: (Symbol schema_name, Symbol table_name, untyped configuration_indexes, untyped database_indexes) -> void
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.6.1
4
+ version: 3.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Craig Ulliott