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 "name": {
19 "name": "name",
20 "type": "text",
21 "unsigned": false,
22 "autoincrement": false,
23 "primary": false,
24 "nullable": false,
25 "default": "'Medusa Store'",
26 "mappedType": "text"
27 },
28 "default_sales_channel_id": {
29 "name": "default_sales_channel_id",
30 "type": "text",
31 "unsigned": false,
32 "autoincrement": false,
33 "primary": false,
34 "nullable": true,
35 "mappedType": "text"
36 },
37 "default_region_id": {
38 "name": "default_region_id",
39 "type": "text",
40 "unsigned": false,
41 "autoincrement": false,
42 "primary": false,
43 "nullable": true,
44 "mappedType": "text"
45 },
46 "default_location_id": {
47 "name": "default_location_id",
48 "type": "text",
49 "unsigned": false,
50 "autoincrement": false,
51 "primary": false,
52 "nullable": true,
53 "mappedType": "text"
54 },
55 "metadata": {
56 "name": "metadata",
57 "type": "jsonb",
58 "unsigned": false,
59 "autoincrement": false,
60 "primary": false,
61 "nullable": true,
62 "mappedType": "json"
63 },
64 "created_at": {
65 "name": "created_at",
66 "type": "timestamptz",
67 "unsigned": false,
68 "autoincrement": false,
69 "primary": false,
70 "nullable": false,
71 "length": 6,
72 "default": "now()",
73 "mappedType": "datetime"
74 },
75 "updated_at": {
76 "name": "updated_at",
77 "type": "timestamptz",
78 "unsigned": false,
79 "autoincrement": false,
80 "primary": false,
81 "nullable": false,
82 "length": 6,
83 "default": "now()",
84 "mappedType": "datetime"
85 },
86 "deleted_at": {
87 "name": "deleted_at",
88 "type": "timestamptz",
89 "unsigned": false,
90 "autoincrement": false,
91 "primary": false,
92 "nullable": true,
93 "length": 6,
94 "mappedType": "datetime"
95 }
96 },
97 "name": "store",
98 "schema": "public",
99 "indexes": [
100 {
101 "keyName": "IDX_store_deleted_at",
102 "columnNames": [],
103 "composite": false,
104 "constraint": false,
105 "primary": false,
106 "unique": false,
107 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_store_deleted_at\" ON \"store\" (\"deleted_at\") WHERE deleted_at IS NULL"
108 },
109 {
110 "keyName": "store_pkey",
111 "columnNames": [
112 "id"
113 ],
114 "composite": false,
115 "constraint": true,
116 "primary": true,
117 "unique": true
118 }
119 ],
120 "checks": [],
121 "foreignKeys": {},
122 "nativeEnums": {}
123 },
124 {
125 "columns": {
126 "id": {
127 "name": "id",
128 "type": "text",
129 "unsigned": false,
130 "autoincrement": false,
131 "primary": false,
132 "nullable": false,
133 "mappedType": "text"
134 },
135 "currency_code": {
136 "name": "currency_code",
137 "type": "text",
138 "unsigned": false,
139 "autoincrement": false,
140 "primary": false,
141 "nullable": false,
142 "mappedType": "text"
143 },
144 "is_default": {
145 "name": "is_default",
146 "type": "boolean",
147 "unsigned": false,
148 "autoincrement": false,
149 "primary": false,
150 "nullable": false,
151 "default": "false",
152 "mappedType": "boolean"
153 },
154 "store_id": {
155 "name": "store_id",
156 "type": "text",
157 "unsigned": false,
158 "autoincrement": false,
159 "primary": false,
160 "nullable": true,
161 "mappedType": "text"
162 },
163 "created_at": {
164 "name": "created_at",
165 "type": "timestamptz",
166 "unsigned": false,
167 "autoincrement": false,
168 "primary": false,
169 "nullable": false,
170 "length": 6,
171 "default": "now()",
172 "mappedType": "datetime"
173 },
174 "updated_at": {
175 "name": "updated_at",
176 "type": "timestamptz",
177 "unsigned": false,
178 "autoincrement": false,
179 "primary": false,
180 "nullable": false,
181 "length": 6,
182 "default": "now()",
183 "mappedType": "datetime"
184 },
185 "deleted_at": {
186 "name": "deleted_at",
187 "type": "timestamptz",
188 "unsigned": false,
189 "autoincrement": false,
190 "primary": false,
191 "nullable": true,
192 "length": 6,
193 "mappedType": "datetime"
194 }
195 },
196 "name": "store_currency",
197 "schema": "public",
198 "indexes": [
199 {
200 "keyName": "IDX_store_currency_store_id",
201 "columnNames": [],
202 "composite": false,
203 "constraint": false,
204 "primary": false,
205 "unique": false,
206 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_store_currency_store_id\" ON \"store_currency\" (\"store_id\") WHERE deleted_at IS NULL"
207 },
208 {
209 "keyName": "IDX_store_currency_deleted_at",
210 "columnNames": [],
211 "composite": false,
212 "constraint": false,
213 "primary": false,
214 "unique": false,
215 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_store_currency_deleted_at\" ON \"store_currency\" (\"deleted_at\") WHERE deleted_at IS NULL"
216 },
217 {
218 "keyName": "store_currency_pkey",
219 "columnNames": [
220 "id"
221 ],
222 "composite": false,
223 "constraint": true,
224 "primary": true,
225 "unique": true
226 }
227 ],
228 "checks": [],
229 "foreignKeys": {
230 "store_currency_store_id_foreign": {
231 "constraintName": "store_currency_store_id_foreign",
232 "columnNames": [
233 "store_id"
234 ],
235 "localTableName": "public.store_currency",
236 "referencedColumnNames": [
237 "id"
238 ],
239 "referencedTableName": "public.store",
240 "deleteRule": "cascade",
241 "updateRule": "cascade"
242 }
243 },
244 "nativeEnums": {}
245 },
246 {
247 "columns": {
248 "id": {
249 "name": "id",
250 "type": "text",
251 "unsigned": false,
252 "autoincrement": false,
253 "primary": false,
254 "nullable": false,
255 "mappedType": "text"
256 },
257 "locale_code": {
258 "name": "locale_code",
259 "type": "text",
260 "unsigned": false,
261 "autoincrement": false,
262 "primary": false,
263 "nullable": false,
264 "mappedType": "text"
265 },
266 "store_id": {
267 "name": "store_id",
268 "type": "text",
269 "unsigned": false,
270 "autoincrement": false,
271 "primary": false,
272 "nullable": true,
273 "mappedType": "text"
274 },
275 "created_at": {
276 "name": "created_at",
277 "type": "timestamptz",
278 "unsigned": false,
279 "autoincrement": false,
280 "primary": false,
281 "nullable": false,
282 "length": 6,
283 "default": "now()",
284 "mappedType": "datetime"
285 },
286 "updated_at": {
287 "name": "updated_at",
288 "type": "timestamptz",
289 "unsigned": false,
290 "autoincrement": false,
291 "primary": false,
292 "nullable": false,
293 "length": 6,
294 "default": "now()",
295 "mappedType": "datetime"
296 },
297 "deleted_at": {
298 "name": "deleted_at",
299 "type": "timestamptz",
300 "unsigned": false,
301 "autoincrement": false,
302 "primary": false,
303 "nullable": true,
304 "length": 6,
305 "mappedType": "datetime"
306 }
307 },
308 "name": "store_locale",
309 "schema": "public",
310 "indexes": [
311 {
312 "keyName": "IDX_store_locale_store_id",
313 "columnNames": [],
314 "composite": false,
315 "constraint": false,
316 "primary": false,
317 "unique": false,
318 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_store_locale_store_id\" ON \"store_locale\" (\"store_id\") WHERE deleted_at IS NULL"
319 },
320 {
321 "keyName": "IDX_store_locale_deleted_at",
322 "columnNames": [],
323 "composite": false,
324 "constraint": false,
325 "primary": false,
326 "unique": false,
327 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_store_locale_deleted_at\" ON \"store_locale\" (\"deleted_at\") WHERE deleted_at IS NULL"
328 },
329 {
330 "keyName": "store_locale_pkey",
331 "columnNames": [
332 "id"
333 ],
334 "composite": false,
335 "constraint": true,
336 "primary": true,
337 "unique": true
338 }
339 ],
340 "checks": [],
341 "foreignKeys": {
342 "store_locale_store_id_foreign": {
343 "constraintName": "store_locale_store_id_foreign",
344 "columnNames": [
345 "store_id"
346 ],
347 "localTableName": "public.store_locale",
348 "referencedColumnNames": [
349 "id"
350 ],
351 "referencedTableName": "public.store",
352 "deleteRule": "cascade",
353 "updateRule": "cascade"
354 }
355 },
356 "nativeEnums": {}
357 }
358 ],
359 "nativeEnums": {}
360 }