schema2type 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/schema2type/cli.rb +9 -0
- data/lib/schema2type/schema_converter.rb +16 -0
- data/lib/schema2type/version.rb +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: 02fa7b245c3982e43bc3bc036bc66002761e5480bea67a8b03c02a1906c127fe
|
4
|
+
data.tar.gz: 702e75ab3e359de42869023ef7797fab7524a354174422a76d4dc1a6ca830ec1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 975dbebb6c6c1a05dffc50ec0bd752b69a50b83095260e6b577ac17fe355f74859e092ba3e39cf80d5e13ed6530447e8cf983e91e5980f4e345cacbe844a68ab
|
7
|
+
data.tar.gz: ca8ab04169156ed6da7aa95f4aa62faff2c0603d74317e80f883cf34d25cc07e75b3e4714ff3ce0b43ef664ddd33fe6212d9cae64a768d31ba731fa8bed3d658
|
data/Gemfile.lock
CHANGED
data/lib/schema2type/cli.rb
CHANGED
@@ -37,6 +37,15 @@ declare namespace #{name_space ||= "schema"} {
|
|
37
37
|
$convert_types.concat(converter.out_text)
|
38
38
|
end
|
39
39
|
|
40
|
+
def self.enable_extension(*arg)
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.add_foreign_key(*arg)
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.add_index(*arg)
|
47
|
+
end
|
48
|
+
|
40
49
|
module ActiveRecord
|
41
50
|
class Schema
|
42
51
|
def self.define(version, &block)
|
@@ -28,6 +28,10 @@ module Schema2type
|
|
28
28
|
push_property_line name: name, type: TYPE_STRING, options: options
|
29
29
|
end
|
30
30
|
|
31
|
+
def inet(name, *options)
|
32
|
+
push_property_line name: name, type: TYPE_STRING, options: options
|
33
|
+
end
|
34
|
+
|
31
35
|
def integer(name, *options)
|
32
36
|
push_property_line name: name, type: TYPE_NUMBER, options: options
|
33
37
|
end
|
@@ -36,6 +40,10 @@ module Schema2type
|
|
36
40
|
push_property_line name: name, type: TYPE_NUMBER, options: options
|
37
41
|
end
|
38
42
|
|
43
|
+
def float(name, *options)
|
44
|
+
push_property_line name: name, type: TYPE_NUMBER, options: options
|
45
|
+
end
|
46
|
+
|
39
47
|
def text(name, *options)
|
40
48
|
push_property_line name: name, type: TYPE_STRING, options: options
|
41
49
|
end
|
@@ -52,6 +60,10 @@ module Schema2type
|
|
52
60
|
push_property_line name: name, type: TYPE_STRING, options: options
|
53
61
|
end
|
54
62
|
|
63
|
+
def jsonb(name, *options)
|
64
|
+
push_property_line name: name, type: TYPE_STRING, options: options
|
65
|
+
end
|
66
|
+
|
55
67
|
def binary(name, *options)
|
56
68
|
push_property_line name: name, type: TYPE_STRING, options: options
|
57
69
|
end
|
@@ -64,6 +76,10 @@ module Schema2type
|
|
64
76
|
push_property_line name: name, type: TYPE_DATE, options: options
|
65
77
|
end
|
66
78
|
|
79
|
+
def datetime_with_timezone(name, *options)
|
80
|
+
push_property_line name: name, type: TYPE_DATE, options: options
|
81
|
+
end
|
82
|
+
|
67
83
|
def index(*arg)
|
68
84
|
end
|
69
85
|
|
data/lib/schema2type/version.rb
CHANGED