@@ -8,6 +8,7 @@ WITH column_data AS (
8
8
c .column_name AS name,
9
9
JSON_OBJECT(' ScalarType' ,
10
10
case LOWER (c .data_type )
11
+ when ' bool' then ' boolean'
11
12
when ' boolean' then ' boolean'
12
13
when ' int16' then ' smallint'
13
14
when ' smallint' then ' smallint'
@@ -26,10 +27,14 @@ WITH column_data AS (
26
27
when ' json' then ' json'
27
28
when ' jsonb' then ' jsonb'
28
29
when ' date' then ' date'
29
- when ' time with time zone' then ' time with time zone'
30
- when ' time without time zone' then ' time without time zone'
31
- when ' timestamp with time zone' then ' timestamp with time zone'
32
- when ' timestamp without time zone' then ' timestamp without time zone'
30
+ when ' timetz' then ' timetz'
31
+ when ' time' then ' time'
32
+ when ' timestamptz' then ' timestamptz'
33
+ when ' timestamp' then ' timestamp'
34
+ when ' time with time zone' then ' timetz'
35
+ when ' time without time zone' then ' time'
36
+ when ' timestamp with time zone' then ' timestamptz'
37
+ when ' timestamp without time zone' then ' timestamp'
33
38
when ' uuid' then ' uuid'
34
39
else ' any'
35
40
end
@@ -41,7 +46,7 @@ WITH column_data AS (
41
46
ON c .table_catalog = t .table_catalog
42
47
AND c .table_schema = t .table_schema
43
48
AND c .table_name = t .table_name
44
- WHERE t .table_schema = ' chinook_sample '
49
+ WHERE t .table_schema = ' HASURA_DATABASE_SCHEMA_PLACEHOLDER '
45
50
),
46
51
columns_struct AS (
47
52
SELECT
@@ -77,7 +82,7 @@ relationship_data AS (
77
82
AND c .constraint_schema = rc .constraint_schema
78
83
AND c .constraint_name = rc .constraint_name
79
84
JOIN HASURA_DATABASE_NAME_PLACEHOLDER .INFORMATION_SCHEMA .KEY_COLUMN_USAGE as fc ON c .constraint_name = fc .constraint_name
80
- WHERE t .table_schema = ' chinook_sample ' AND c .constraint_type = ' FOREIGN KEY'
85
+ WHERE t .table_schema = ' HASURA_DATABASE_SCHEMA_PLACEHOLDER ' AND c .constraint_type = ' FOREIGN KEY'
81
86
GROUP BY t .table_name , table_catalog, table_schema, constraint_name, rc .table_name , fc .column_name , rc .column_name
82
87
),
83
88
relationship_struct AS (
@@ -108,7 +113,7 @@ unique_constraint_data AS (
108
113
AND c .table_name = t .table_name
109
114
JOIN HASURA_DATABASE_NAME_PLACEHOLDER .INFORMATION_SCHEMA .CONSTRAINT_COLUMN_USAGE as cc
110
115
ON c .constraint_name = cc .constraint_name
111
- WHERE t .table_schema = ' chinook_sample '
116
+ WHERE t .table_schema = ' HASURA_DATABASE_SCHEMA_PLACEHOLDER '
112
117
AND c .constraint_type in (' PRIMARY KEY' , ' UNIQUE' )
113
118
AND cc .constraint_catalog = c .constraint_catalog
114
119
AND cc .constraint_schema = c .constraint_schema
0 commit comments