dynamic_migrations 3.6.0 → 3.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/lib/dynamic_migrations/postgres/generator/trigger_template_base.rb +1 -0
- data/lib/dynamic_migrations/postgres/generator/validation_template_base.rb +1 -0
- data/lib/dynamic_migrations/postgres/server/database/differences/to_migrations/schemas/tables.rb +6 -3
- data/lib/dynamic_migrations/version.rb +1 -1
- data/sig/dynamic_migrations/postgres/generator/trigger_template_base.rbs +1 -1
- data/sig/dynamic_migrations/postgres/generator/validation_template_base.rbs +1 -1
- data/sig/dynamic_migrations/postgres/server/database/differences/to_migrations/schemas/tables.rbs +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a237bb66c7567c302f4f01ada5c06be36187234cd430da63a753eac9c3c0320
|
4
|
+
data.tar.gz: ab87c5f523b6a682a4e6b648b050e609fe1bfca14bcf1fdebd813b04a5f5091b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94080c180556da70c9bba292ec6de10de980ed95ff71705c14b320a56b507eae50cccbc1654354184406bce6386b03bde27afdae2615c8060818f8ab5f876bc1
|
7
|
+
data.tar.gz: e1800b2c149556be65affbf35321abd7f50282efe54dcb33af379cc24ea493c7c72663eff1b7e4379eef4ac8eb852b5a36f8532f844ebc7eadb6784b495e62ff
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
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
|
+
|
10
|
+
## [3.6.1](https://github.com/craigulliott/dynamic_migrations/compare/v3.6.0...v3.6.1) (2023-09-13)
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* adding attr_reader for :code_comment to provide easier access within migration templates ([b805e24](https://github.com/craigulliott/dynamic_migrations/commit/b805e247ef42ea4dd62973be07057d6e110876a3))
|
16
|
+
|
3
17
|
## [3.6.0](https://github.com/craigulliott/dynamic_migrations/compare/v3.5.3...v3.6.0) (2023-09-13)
|
4
18
|
|
5
19
|
|
data/lib/dynamic_migrations/postgres/server/database/differences/to_migrations/schemas/tables.rb
CHANGED
@@ -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
|
-
|
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] || {}
|
@@ -5,9 +5,9 @@ module DynamicMigrations
|
|
5
5
|
module Postgres
|
6
6
|
class Generator
|
7
7
|
class ValidationTemplateBase
|
8
|
-
@code_comment: untyped
|
9
8
|
|
10
9
|
attr_reader validation: untyped
|
10
|
+
attr_reader code_comment: String?
|
11
11
|
|
12
12
|
def initialize: (untyped validation, untyped code_comment) -> void
|
13
13
|
|
data/sig/dynamic_migrations/postgres/server/database/differences/to_migrations/schemas/tables.rbs
CHANGED
@@ -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
|