dynamic_migrations 3.6.4 → 3.6.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d55b74ca5d593d1eb9b5f7709f9f5d5e1de5c2d5d13ef7e3073a68f79ff9d8e3
|
4
|
+
data.tar.gz: 8fa0077921bff51558769231e26f050bb6818d908a137e76c1ae566b622216c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 588d41a319f45fcfba3c7708adf33edf8b3d1e8adf4f82d222f4fcaf4842b5c98607efa4db7033f8c42df8ab3d9796d32a3f5216634a7b69bd616b022e285d97
|
7
|
+
data.tar.gz: 5144499575a152f2251a218b7033c2190d00f247ef5e864215db2b7f1992dd3c21399e65cb102db8d969b8eb08913d2bc0c4d54610f45fd4091b9b3450ee4199
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [3.6.6](https://github.com/craigulliott/dynamic_migrations/compare/v3.6.5...v3.6.6) (2023-09-13)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* column_name and data_type were presented in the wrong order ([e58f8df](https://github.com/craigulliott/dynamic_migrations/commit/e58f8df7d2acabc8a64f760d6ababe218a23928d))
|
9
|
+
|
10
|
+
## [3.6.5](https://github.com/craigulliott/dynamic_migrations/compare/v3.6.4...v3.6.5) (2023-09-13)
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* setting current schema on the migration class instead of the shared module ([28bc2ca](https://github.com/craigulliott/dynamic_migrations/commit/28bc2ca454883696665804c8596fc3b19ce31bb4))
|
16
|
+
|
3
17
|
## [3.6.4](https://github.com/craigulliott/dynamic_migrations/compare/v3.6.3...v3.6.4) (2023-09-13)
|
4
18
|
|
5
19
|
|
@@ -31,19 +31,24 @@ module DynamicMigrations
|
|
31
31
|
include Trigger
|
32
32
|
include Enum
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
# DynamicMigrations::ActiveRecord::Migrators.set_schema_name :schema_name
|
37
|
-
def self.schema_name
|
38
|
-
@current_schema
|
34
|
+
def self.included(base)
|
35
|
+
base.extend(ClassMethods)
|
39
36
|
end
|
40
37
|
|
41
|
-
|
42
|
-
|
43
|
-
|
38
|
+
module ClassMethods
|
39
|
+
# The schema name should be set on the migration class before the migration
|
40
|
+
# is run
|
41
|
+
def schema_name
|
42
|
+
@current_schema
|
43
|
+
end
|
44
44
|
|
45
|
-
|
46
|
-
|
45
|
+
def set_schema_name schema_name
|
46
|
+
@current_schema = schema_name.to_sym
|
47
|
+
end
|
48
|
+
|
49
|
+
def clear_schema_name
|
50
|
+
@current_schema = nil
|
51
|
+
end
|
47
52
|
end
|
48
53
|
|
49
54
|
def quote string
|
@@ -52,7 +57,7 @@ module DynamicMigrations
|
|
52
57
|
|
53
58
|
# this method is made available on the final migration class
|
54
59
|
def schema_name
|
55
|
-
sn =
|
60
|
+
sn = self.class.schema_name
|
56
61
|
if sn.nil?
|
57
62
|
raise SchemaNameNotSetError
|
58
63
|
end
|
@@ -1,11 +1,6 @@
|
|
1
|
-
# TypeProf 0.21.7
|
2
|
-
|
3
|
-
# Classes
|
4
1
|
module DynamicMigrations
|
5
2
|
module ActiveRecord
|
6
3
|
module Migrators
|
7
|
-
self.@current_schema: nil
|
8
|
-
|
9
4
|
include Validation
|
10
5
|
include ForeignKeyConstraint
|
11
6
|
include Column
|
@@ -14,11 +9,10 @@ module DynamicMigrations
|
|
14
9
|
include Function
|
15
10
|
include Trigger
|
16
11
|
|
17
|
-
def self.
|
18
|
-
def
|
19
|
-
def
|
20
|
-
def self.
|
21
|
-
def schema_name: -> nil
|
12
|
+
def self.included: (untyped base) -> void
|
13
|
+
def quote: (untyped string) -> String
|
14
|
+
def schema_name: -> Symbol
|
15
|
+
def self.schema_name: -> Symbol
|
22
16
|
|
23
17
|
# this methods comes from active record once the module has been included
|
24
18
|
def connection: -> untyped
|
@@ -31,6 +25,14 @@ module DynamicMigrations
|
|
31
25
|
|
32
26
|
class MissingFunctionBlockError < StandardError
|
33
27
|
end
|
28
|
+
|
29
|
+
module ClassMethods
|
30
|
+
@current_schema: Symbol?
|
31
|
+
|
32
|
+
def schema_name: -> Symbol?
|
33
|
+
def set_schema_name: (untyped schema_name) -> void
|
34
|
+
def clear_schema_name: -> void
|
35
|
+
end
|
34
36
|
end
|
35
37
|
end
|
36
38
|
end
|