Raw
1 {
2 "namespaces": [
3 "public"
4 ],
5 "name": "public",
6 "tables": [
7 {
8 "columns": {
9 "id": {
10 "name": "id",
11 "type": "text",
12 "unsigned": false,
13 "autoincrement": false,
14 "primary": false,
15 "nullable": false,
16 "mappedType": "text"
17 },
18 "address_1": {
19 "name": "address_1",
20 "type": "text",
21 "unsigned": false,
22 "autoincrement": false,
23 "primary": false,
24 "nullable": false,
25 "mappedType": "text"
26 },
27 "address_2": {
28 "name": "address_2",
29 "type": "text",
30 "unsigned": false,
31 "autoincrement": false,
32 "primary": false,
33 "nullable": true,
34 "mappedType": "text"
35 },
36 "company": {
37 "name": "company",
38 "type": "text",
39 "unsigned": false,
40 "autoincrement": false,
41 "primary": false,
42 "nullable": true,
43 "mappedType": "text"
44 },
45 "city": {
46 "name": "city",
47 "type": "text",
48 "unsigned": false,
49 "autoincrement": false,
50 "primary": false,
51 "nullable": true,
52 "mappedType": "text"
53 },
54 "country_code": {
55 "name": "country_code",
56 "type": "text",
57 "unsigned": false,
58 "autoincrement": false,
59 "primary": false,
60 "nullable": false,
61 "mappedType": "text"
62 },
63 "phone": {
64 "name": "phone",
65 "type": "text",
66 "unsigned": false,
67 "autoincrement": false,
68 "primary": false,
69 "nullable": true,
70 "mappedType": "text"
71 },
72 "province": {
73 "name": "province",
74 "type": "text",
75 "unsigned": false,
76 "autoincrement": false,
77 "primary": false,
78 "nullable": true,
79 "mappedType": "text"
80 },
81 "postal_code": {
82 "name": "postal_code",
83 "type": "text",
84 "unsigned": false,
85 "autoincrement": false,
86 "primary": false,
87 "nullable": true,
88 "mappedType": "text"
89 },
90 "metadata": {
91 "name": "metadata",
92 "type": "jsonb",
93 "unsigned": false,
94 "autoincrement": false,
95 "primary": false,
96 "nullable": true,
97 "mappedType": "json"
98 },
99 "created_at": {
100 "name": "created_at",
101 "type": "timestamptz",
102 "unsigned": false,
103 "autoincrement": false,
104 "primary": false,
105 "nullable": false,
106 "length": 6,
107 "default": "now()",
108 "mappedType": "datetime"
109 },
110 "updated_at": {
111 "name": "updated_at",
112 "type": "timestamptz",
113 "unsigned": false,
114 "autoincrement": false,
115 "primary": false,
116 "nullable": false,
117 "length": 6,
118 "default": "now()",
119 "mappedType": "datetime"
120 },
121 "deleted_at": {
122 "name": "deleted_at",
123 "type": "timestamptz",
124 "unsigned": false,
125 "autoincrement": false,
126 "primary": false,
127 "nullable": true,
128 "length": 6,
129 "mappedType": "datetime"
130 }
131 },
132 "name": "stock_location_address",
133 "schema": "public",
134 "indexes": [
135 {
136 "keyName": "IDX_stock_location_address_deleted_at",
137 "columnNames": [],
138 "composite": false,
139 "primary": false,
140 "unique": false,
141 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_stock_location_address_deleted_at\" ON \"stock_location_address\" (deleted_at) WHERE deleted_at IS NULL"
142 },
143 {
144 "keyName": "stock_location_address_pkey",
145 "columnNames": [
146 "id"
147 ],
148 "composite": false,
149 "primary": true,
150 "unique": true
151 }
152 ],
153 "checks": [],
154 "foreignKeys": {}
155 },
156 {
157 "columns": {
158 "id": {
159 "name": "id",
160 "type": "text",
161 "unsigned": false,
162 "autoincrement": false,
163 "primary": false,
164 "nullable": false,
165 "mappedType": "text"
166 },
167 "name": {
168 "name": "name",
169 "type": "text",
170 "unsigned": false,
171 "autoincrement": false,
172 "primary": false,
173 "nullable": false,
174 "mappedType": "text"
175 },
176 "metadata": {
177 "name": "metadata",
178 "type": "jsonb",
179 "unsigned": false,
180 "autoincrement": false,
181 "primary": false,
182 "nullable": true,
183 "mappedType": "json"
184 },
185 "address_id": {
186 "name": "address_id",
187 "type": "text",
188 "unsigned": false,
189 "autoincrement": false,
190 "primary": false,
191 "nullable": true,
192 "mappedType": "text"
193 },
194 "created_at": {
195 "name": "created_at",
196 "type": "timestamptz",
197 "unsigned": false,
198 "autoincrement": false,
199 "primary": false,
200 "nullable": false,
201 "length": 6,
202 "default": "now()",
203 "mappedType": "datetime"
204 },
205 "updated_at": {
206 "name": "updated_at",
207 "type": "timestamptz",
208 "unsigned": false,
209 "autoincrement": false,
210 "primary": false,
211 "nullable": false,
212 "length": 6,
213 "default": "now()",
214 "mappedType": "datetime"
215 },
216 "deleted_at": {
217 "name": "deleted_at",
218 "type": "timestamptz",
219 "unsigned": false,
220 "autoincrement": false,
221 "primary": false,
222 "nullable": true,
223 "length": 6,
224 "mappedType": "datetime"
225 }
226 },
227 "name": "stock_location",
228 "schema": "public",
229 "indexes": [
230 {
231 "keyName": "IDX_stock_location_address_id_unique",
232 "columnNames": [],
233 "composite": false,
234 "primary": false,
235 "unique": false,
236 "expression": "CREATE UNIQUE INDEX IF NOT EXISTS \"IDX_stock_location_address_id_unique\" ON \"stock_location\" (address_id) WHERE deleted_at IS NULL"
237 },
238 {
239 "keyName": "IDX_stock_location_deleted_at",
240 "columnNames": [],
241 "composite": false,
242 "primary": false,
243 "unique": false,
244 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_stock_location_deleted_at\" ON \"stock_location\" (deleted_at) WHERE deleted_at IS NULL"
245 },
246 {
247 "keyName": "stock_location_pkey",
248 "columnNames": [
249 "id"
250 ],
251 "composite": false,
252 "primary": true,
253 "unique": true
254 }
255 ],
256 "checks": [],
257 "foreignKeys": {
258 "stock_location_address_id_foreign": {
259 "constraintName": "stock_location_address_id_foreign",
260 "columnNames": [
261 "address_id"
262 ],
263 "localTableName": "public.stock_location",
264 "referencedColumnNames": [
265 "id"
266 ],
267 "referencedTableName": "public.stock_location_address",
268 "deleteRule": "cascade",
269 "updateRule": "cascade"
270 }
271 }
272 }
273 ]
274 }