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