@checkstack/healthcheck-backend 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,240 @@
1
+ {
2
+ "id": "2dab14f4-bacc-4f60-845b-c7c27ce740d0",
3
+ "prevId": "74a6fab2-e8df-4d0f-a2af-669d072ecdf5",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.health_check_configurations": {
8
+ "name": "health_check_configurations",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "name": {
19
+ "name": "name",
20
+ "type": "text",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "strategy_id": {
25
+ "name": "strategy_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true
29
+ },
30
+ "config": {
31
+ "name": "config",
32
+ "type": "jsonb",
33
+ "primaryKey": false,
34
+ "notNull": true
35
+ },
36
+ "interval_seconds": {
37
+ "name": "interval_seconds",
38
+ "type": "integer",
39
+ "primaryKey": false,
40
+ "notNull": true
41
+ },
42
+ "is_template": {
43
+ "name": "is_template",
44
+ "type": "boolean",
45
+ "primaryKey": false,
46
+ "notNull": false,
47
+ "default": false
48
+ },
49
+ "created_at": {
50
+ "name": "created_at",
51
+ "type": "timestamp",
52
+ "primaryKey": false,
53
+ "notNull": true,
54
+ "default": "now()"
55
+ },
56
+ "updated_at": {
57
+ "name": "updated_at",
58
+ "type": "timestamp",
59
+ "primaryKey": false,
60
+ "notNull": true,
61
+ "default": "now()"
62
+ }
63
+ },
64
+ "indexes": {},
65
+ "foreignKeys": {},
66
+ "compositePrimaryKeys": {},
67
+ "uniqueConstraints": {},
68
+ "policies": {},
69
+ "checkConstraints": {},
70
+ "isRLSEnabled": false
71
+ },
72
+ "public.health_check_runs": {
73
+ "name": "health_check_runs",
74
+ "schema": "",
75
+ "columns": {
76
+ "id": {
77
+ "name": "id",
78
+ "type": "uuid",
79
+ "primaryKey": true,
80
+ "notNull": true,
81
+ "default": "gen_random_uuid()"
82
+ },
83
+ "configuration_id": {
84
+ "name": "configuration_id",
85
+ "type": "uuid",
86
+ "primaryKey": false,
87
+ "notNull": true
88
+ },
89
+ "system_id": {
90
+ "name": "system_id",
91
+ "type": "text",
92
+ "primaryKey": false,
93
+ "notNull": true
94
+ },
95
+ "status": {
96
+ "name": "status",
97
+ "type": "health_check_status",
98
+ "typeSchema": "public",
99
+ "primaryKey": false,
100
+ "notNull": true
101
+ },
102
+ "latency_ms": {
103
+ "name": "latency_ms",
104
+ "type": "integer",
105
+ "primaryKey": false,
106
+ "notNull": false
107
+ },
108
+ "result": {
109
+ "name": "result",
110
+ "type": "jsonb",
111
+ "primaryKey": false,
112
+ "notNull": false
113
+ },
114
+ "timestamp": {
115
+ "name": "timestamp",
116
+ "type": "timestamp",
117
+ "primaryKey": false,
118
+ "notNull": true,
119
+ "default": "now()"
120
+ }
121
+ },
122
+ "indexes": {},
123
+ "foreignKeys": {
124
+ "health_check_runs_configuration_id_health_check_configurations_id_fk": {
125
+ "name": "health_check_runs_configuration_id_health_check_configurations_id_fk",
126
+ "tableFrom": "health_check_runs",
127
+ "tableTo": "health_check_configurations",
128
+ "columnsFrom": [
129
+ "configuration_id"
130
+ ],
131
+ "columnsTo": [
132
+ "id"
133
+ ],
134
+ "onDelete": "cascade",
135
+ "onUpdate": "no action"
136
+ }
137
+ },
138
+ "compositePrimaryKeys": {},
139
+ "uniqueConstraints": {},
140
+ "policies": {},
141
+ "checkConstraints": {},
142
+ "isRLSEnabled": false
143
+ },
144
+ "public.system_health_checks": {
145
+ "name": "system_health_checks",
146
+ "schema": "",
147
+ "columns": {
148
+ "system_id": {
149
+ "name": "system_id",
150
+ "type": "text",
151
+ "primaryKey": false,
152
+ "notNull": true
153
+ },
154
+ "configuration_id": {
155
+ "name": "configuration_id",
156
+ "type": "uuid",
157
+ "primaryKey": false,
158
+ "notNull": true
159
+ },
160
+ "enabled": {
161
+ "name": "enabled",
162
+ "type": "boolean",
163
+ "primaryKey": false,
164
+ "notNull": true,
165
+ "default": true
166
+ },
167
+ "state_thresholds": {
168
+ "name": "state_thresholds",
169
+ "type": "jsonb",
170
+ "primaryKey": false,
171
+ "notNull": false
172
+ },
173
+ "created_at": {
174
+ "name": "created_at",
175
+ "type": "timestamp",
176
+ "primaryKey": false,
177
+ "notNull": true,
178
+ "default": "now()"
179
+ },
180
+ "updated_at": {
181
+ "name": "updated_at",
182
+ "type": "timestamp",
183
+ "primaryKey": false,
184
+ "notNull": true,
185
+ "default": "now()"
186
+ }
187
+ },
188
+ "indexes": {},
189
+ "foreignKeys": {
190
+ "system_health_checks_configuration_id_health_check_configurations_id_fk": {
191
+ "name": "system_health_checks_configuration_id_health_check_configurations_id_fk",
192
+ "tableFrom": "system_health_checks",
193
+ "tableTo": "health_check_configurations",
194
+ "columnsFrom": [
195
+ "configuration_id"
196
+ ],
197
+ "columnsTo": [
198
+ "id"
199
+ ],
200
+ "onDelete": "cascade",
201
+ "onUpdate": "no action"
202
+ }
203
+ },
204
+ "compositePrimaryKeys": {
205
+ "system_health_checks_system_id_configuration_id_pk": {
206
+ "name": "system_health_checks_system_id_configuration_id_pk",
207
+ "columns": [
208
+ "system_id",
209
+ "configuration_id"
210
+ ]
211
+ }
212
+ },
213
+ "uniqueConstraints": {},
214
+ "policies": {},
215
+ "checkConstraints": {},
216
+ "isRLSEnabled": false
217
+ }
218
+ },
219
+ "enums": {
220
+ "public.health_check_status": {
221
+ "name": "health_check_status",
222
+ "schema": "public",
223
+ "values": [
224
+ "healthy",
225
+ "unhealthy",
226
+ "degraded"
227
+ ]
228
+ }
229
+ },
230
+ "schemas": {},
231
+ "sequences": {},
232
+ "roles": {},
233
+ "policies": {},
234
+ "views": {},
235
+ "_meta": {
236
+ "columns": {},
237
+ "schemas": {},
238
+ "tables": {}
239
+ }
240
+ }
@@ -0,0 +1,361 @@
1
+ {
2
+ "id": "e1764a37-345f-49df-85b1-1232b37864a3",
3
+ "prevId": "2dab14f4-bacc-4f60-845b-c7c27ce740d0",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.health_check_aggregates": {
8
+ "name": "health_check_aggregates",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "configuration_id": {
19
+ "name": "configuration_id",
20
+ "type": "uuid",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "system_id": {
25
+ "name": "system_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true
29
+ },
30
+ "bucket_start": {
31
+ "name": "bucket_start",
32
+ "type": "timestamp",
33
+ "primaryKey": false,
34
+ "notNull": true
35
+ },
36
+ "bucket_size": {
37
+ "name": "bucket_size",
38
+ "type": "bucket_size",
39
+ "typeSchema": "public",
40
+ "primaryKey": false,
41
+ "notNull": true
42
+ },
43
+ "run_count": {
44
+ "name": "run_count",
45
+ "type": "integer",
46
+ "primaryKey": false,
47
+ "notNull": true
48
+ },
49
+ "healthy_count": {
50
+ "name": "healthy_count",
51
+ "type": "integer",
52
+ "primaryKey": false,
53
+ "notNull": true
54
+ },
55
+ "degraded_count": {
56
+ "name": "degraded_count",
57
+ "type": "integer",
58
+ "primaryKey": false,
59
+ "notNull": true
60
+ },
61
+ "unhealthy_count": {
62
+ "name": "unhealthy_count",
63
+ "type": "integer",
64
+ "primaryKey": false,
65
+ "notNull": true
66
+ },
67
+ "avg_latency_ms": {
68
+ "name": "avg_latency_ms",
69
+ "type": "integer",
70
+ "primaryKey": false,
71
+ "notNull": false
72
+ },
73
+ "min_latency_ms": {
74
+ "name": "min_latency_ms",
75
+ "type": "integer",
76
+ "primaryKey": false,
77
+ "notNull": false
78
+ },
79
+ "max_latency_ms": {
80
+ "name": "max_latency_ms",
81
+ "type": "integer",
82
+ "primaryKey": false,
83
+ "notNull": false
84
+ },
85
+ "p95_latency_ms": {
86
+ "name": "p95_latency_ms",
87
+ "type": "integer",
88
+ "primaryKey": false,
89
+ "notNull": false
90
+ },
91
+ "aggregated_metadata": {
92
+ "name": "aggregated_metadata",
93
+ "type": "jsonb",
94
+ "primaryKey": false,
95
+ "notNull": false
96
+ }
97
+ },
98
+ "indexes": {},
99
+ "foreignKeys": {
100
+ "health_check_aggregates_configuration_id_health_check_configurations_id_fk": {
101
+ "name": "health_check_aggregates_configuration_id_health_check_configurations_id_fk",
102
+ "tableFrom": "health_check_aggregates",
103
+ "tableTo": "health_check_configurations",
104
+ "columnsFrom": [
105
+ "configuration_id"
106
+ ],
107
+ "columnsTo": [
108
+ "id"
109
+ ],
110
+ "onDelete": "cascade",
111
+ "onUpdate": "no action"
112
+ }
113
+ },
114
+ "compositePrimaryKeys": {},
115
+ "uniqueConstraints": {},
116
+ "policies": {},
117
+ "checkConstraints": {},
118
+ "isRLSEnabled": false
119
+ },
120
+ "public.health_check_configurations": {
121
+ "name": "health_check_configurations",
122
+ "schema": "",
123
+ "columns": {
124
+ "id": {
125
+ "name": "id",
126
+ "type": "uuid",
127
+ "primaryKey": true,
128
+ "notNull": true,
129
+ "default": "gen_random_uuid()"
130
+ },
131
+ "name": {
132
+ "name": "name",
133
+ "type": "text",
134
+ "primaryKey": false,
135
+ "notNull": true
136
+ },
137
+ "strategy_id": {
138
+ "name": "strategy_id",
139
+ "type": "text",
140
+ "primaryKey": false,
141
+ "notNull": true
142
+ },
143
+ "config": {
144
+ "name": "config",
145
+ "type": "jsonb",
146
+ "primaryKey": false,
147
+ "notNull": true
148
+ },
149
+ "interval_seconds": {
150
+ "name": "interval_seconds",
151
+ "type": "integer",
152
+ "primaryKey": false,
153
+ "notNull": true
154
+ },
155
+ "is_template": {
156
+ "name": "is_template",
157
+ "type": "boolean",
158
+ "primaryKey": false,
159
+ "notNull": false,
160
+ "default": false
161
+ },
162
+ "created_at": {
163
+ "name": "created_at",
164
+ "type": "timestamp",
165
+ "primaryKey": false,
166
+ "notNull": true,
167
+ "default": "now()"
168
+ },
169
+ "updated_at": {
170
+ "name": "updated_at",
171
+ "type": "timestamp",
172
+ "primaryKey": false,
173
+ "notNull": true,
174
+ "default": "now()"
175
+ }
176
+ },
177
+ "indexes": {},
178
+ "foreignKeys": {},
179
+ "compositePrimaryKeys": {},
180
+ "uniqueConstraints": {},
181
+ "policies": {},
182
+ "checkConstraints": {},
183
+ "isRLSEnabled": false
184
+ },
185
+ "public.health_check_runs": {
186
+ "name": "health_check_runs",
187
+ "schema": "",
188
+ "columns": {
189
+ "id": {
190
+ "name": "id",
191
+ "type": "uuid",
192
+ "primaryKey": true,
193
+ "notNull": true,
194
+ "default": "gen_random_uuid()"
195
+ },
196
+ "configuration_id": {
197
+ "name": "configuration_id",
198
+ "type": "uuid",
199
+ "primaryKey": false,
200
+ "notNull": true
201
+ },
202
+ "system_id": {
203
+ "name": "system_id",
204
+ "type": "text",
205
+ "primaryKey": false,
206
+ "notNull": true
207
+ },
208
+ "status": {
209
+ "name": "status",
210
+ "type": "health_check_status",
211
+ "typeSchema": "public",
212
+ "primaryKey": false,
213
+ "notNull": true
214
+ },
215
+ "latency_ms": {
216
+ "name": "latency_ms",
217
+ "type": "integer",
218
+ "primaryKey": false,
219
+ "notNull": false
220
+ },
221
+ "result": {
222
+ "name": "result",
223
+ "type": "jsonb",
224
+ "primaryKey": false,
225
+ "notNull": false
226
+ },
227
+ "timestamp": {
228
+ "name": "timestamp",
229
+ "type": "timestamp",
230
+ "primaryKey": false,
231
+ "notNull": true,
232
+ "default": "now()"
233
+ }
234
+ },
235
+ "indexes": {},
236
+ "foreignKeys": {
237
+ "health_check_runs_configuration_id_health_check_configurations_id_fk": {
238
+ "name": "health_check_runs_configuration_id_health_check_configurations_id_fk",
239
+ "tableFrom": "health_check_runs",
240
+ "tableTo": "health_check_configurations",
241
+ "columnsFrom": [
242
+ "configuration_id"
243
+ ],
244
+ "columnsTo": [
245
+ "id"
246
+ ],
247
+ "onDelete": "cascade",
248
+ "onUpdate": "no action"
249
+ }
250
+ },
251
+ "compositePrimaryKeys": {},
252
+ "uniqueConstraints": {},
253
+ "policies": {},
254
+ "checkConstraints": {},
255
+ "isRLSEnabled": false
256
+ },
257
+ "public.system_health_checks": {
258
+ "name": "system_health_checks",
259
+ "schema": "",
260
+ "columns": {
261
+ "system_id": {
262
+ "name": "system_id",
263
+ "type": "text",
264
+ "primaryKey": false,
265
+ "notNull": true
266
+ },
267
+ "configuration_id": {
268
+ "name": "configuration_id",
269
+ "type": "uuid",
270
+ "primaryKey": false,
271
+ "notNull": true
272
+ },
273
+ "enabled": {
274
+ "name": "enabled",
275
+ "type": "boolean",
276
+ "primaryKey": false,
277
+ "notNull": true,
278
+ "default": true
279
+ },
280
+ "state_thresholds": {
281
+ "name": "state_thresholds",
282
+ "type": "jsonb",
283
+ "primaryKey": false,
284
+ "notNull": false
285
+ },
286
+ "created_at": {
287
+ "name": "created_at",
288
+ "type": "timestamp",
289
+ "primaryKey": false,
290
+ "notNull": true,
291
+ "default": "now()"
292
+ },
293
+ "updated_at": {
294
+ "name": "updated_at",
295
+ "type": "timestamp",
296
+ "primaryKey": false,
297
+ "notNull": true,
298
+ "default": "now()"
299
+ }
300
+ },
301
+ "indexes": {},
302
+ "foreignKeys": {
303
+ "system_health_checks_configuration_id_health_check_configurations_id_fk": {
304
+ "name": "system_health_checks_configuration_id_health_check_configurations_id_fk",
305
+ "tableFrom": "system_health_checks",
306
+ "tableTo": "health_check_configurations",
307
+ "columnsFrom": [
308
+ "configuration_id"
309
+ ],
310
+ "columnsTo": [
311
+ "id"
312
+ ],
313
+ "onDelete": "cascade",
314
+ "onUpdate": "no action"
315
+ }
316
+ },
317
+ "compositePrimaryKeys": {
318
+ "system_health_checks_system_id_configuration_id_pk": {
319
+ "name": "system_health_checks_system_id_configuration_id_pk",
320
+ "columns": [
321
+ "system_id",
322
+ "configuration_id"
323
+ ]
324
+ }
325
+ },
326
+ "uniqueConstraints": {},
327
+ "policies": {},
328
+ "checkConstraints": {},
329
+ "isRLSEnabled": false
330
+ }
331
+ },
332
+ "enums": {
333
+ "public.bucket_size": {
334
+ "name": "bucket_size",
335
+ "schema": "public",
336
+ "values": [
337
+ "hourly",
338
+ "daily"
339
+ ]
340
+ },
341
+ "public.health_check_status": {
342
+ "name": "health_check_status",
343
+ "schema": "public",
344
+ "values": [
345
+ "healthy",
346
+ "unhealthy",
347
+ "degraded"
348
+ ]
349
+ }
350
+ },
351
+ "schemas": {},
352
+ "sequences": {},
353
+ "roles": {},
354
+ "policies": {},
355
+ "views": {},
356
+ "_meta": {
357
+ "columns": {},
358
+ "schemas": {},
359
+ "tables": {}
360
+ }
361
+ }