@spfn/notification 0.1.0-beta.5 → 0.1.0-beta.7
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,32 @@
|
|
|
1
|
+
CREATE SCHEMA IF NOT EXISTS "spfn_notification";
|
|
2
|
+
--> statement-breakpoint
|
|
3
|
+
CREATE TABLE IF NOT EXISTS "spfn_notification"."history" (
|
|
4
|
+
"id" bigserial PRIMARY KEY NOT NULL,
|
|
5
|
+
"channel" text NOT NULL,
|
|
6
|
+
"recipient" text NOT NULL,
|
|
7
|
+
"template_name" text,
|
|
8
|
+
"template_data" jsonb,
|
|
9
|
+
"subject" text,
|
|
10
|
+
"content" text,
|
|
11
|
+
"status" text DEFAULT 'pending' NOT NULL,
|
|
12
|
+
"provider_message_id" text,
|
|
13
|
+
"provider_name" text,
|
|
14
|
+
"error_message" text,
|
|
15
|
+
"scheduled_at" timestamp with time zone,
|
|
16
|
+
"sent_at" timestamp with time zone,
|
|
17
|
+
"job_id" text,
|
|
18
|
+
"batch_id" text,
|
|
19
|
+
"reference_type" text,
|
|
20
|
+
"reference_id" text,
|
|
21
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
22
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
23
|
+
);
|
|
24
|
+
--> statement-breakpoint
|
|
25
|
+
CREATE INDEX IF NOT EXISTS "noti_channel_idx" ON "spfn_notification"."history" USING btree ("channel");--> statement-breakpoint
|
|
26
|
+
CREATE INDEX IF NOT EXISTS "noti_status_idx" ON "spfn_notification"."history" USING btree ("status");--> statement-breakpoint
|
|
27
|
+
CREATE INDEX IF NOT EXISTS "noti_recipient_idx" ON "spfn_notification"."history" USING btree ("recipient");--> statement-breakpoint
|
|
28
|
+
CREATE INDEX IF NOT EXISTS "noti_created_at_idx" ON "spfn_notification"."history" USING btree ("created_at");--> statement-breakpoint
|
|
29
|
+
CREATE INDEX IF NOT EXISTS "noti_scheduled_at_idx" ON "spfn_notification"."history" USING btree ("scheduled_at");--> statement-breakpoint
|
|
30
|
+
CREATE INDEX IF NOT EXISTS "noti_job_id_idx" ON "spfn_notification"."history" USING btree ("job_id");--> statement-breakpoint
|
|
31
|
+
CREATE INDEX IF NOT EXISTS "noti_batch_id_idx" ON "spfn_notification"."history" USING btree ("batch_id");--> statement-breakpoint
|
|
32
|
+
CREATE INDEX IF NOT EXISTS "noti_reference_idx" ON "spfn_notification"."history" USING btree ("reference_type","reference_id");
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "71e25072-c482-49b3-82a2-d40ca07060d5",
|
|
3
|
+
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
4
|
+
"version": "7",
|
|
5
|
+
"dialect": "postgresql",
|
|
6
|
+
"tables": {
|
|
7
|
+
"spfn_notification.history": {
|
|
8
|
+
"name": "history",
|
|
9
|
+
"schema": "spfn_notification",
|
|
10
|
+
"columns": {
|
|
11
|
+
"id": {
|
|
12
|
+
"name": "id",
|
|
13
|
+
"type": "bigserial",
|
|
14
|
+
"primaryKey": true,
|
|
15
|
+
"notNull": true
|
|
16
|
+
},
|
|
17
|
+
"channel": {
|
|
18
|
+
"name": "channel",
|
|
19
|
+
"type": "text",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": true
|
|
22
|
+
},
|
|
23
|
+
"recipient": {
|
|
24
|
+
"name": "recipient",
|
|
25
|
+
"type": "text",
|
|
26
|
+
"primaryKey": false,
|
|
27
|
+
"notNull": true
|
|
28
|
+
},
|
|
29
|
+
"template_name": {
|
|
30
|
+
"name": "template_name",
|
|
31
|
+
"type": "text",
|
|
32
|
+
"primaryKey": false,
|
|
33
|
+
"notNull": false
|
|
34
|
+
},
|
|
35
|
+
"template_data": {
|
|
36
|
+
"name": "template_data",
|
|
37
|
+
"type": "jsonb",
|
|
38
|
+
"primaryKey": false,
|
|
39
|
+
"notNull": false
|
|
40
|
+
},
|
|
41
|
+
"subject": {
|
|
42
|
+
"name": "subject",
|
|
43
|
+
"type": "text",
|
|
44
|
+
"primaryKey": false,
|
|
45
|
+
"notNull": false
|
|
46
|
+
},
|
|
47
|
+
"content": {
|
|
48
|
+
"name": "content",
|
|
49
|
+
"type": "text",
|
|
50
|
+
"primaryKey": false,
|
|
51
|
+
"notNull": false
|
|
52
|
+
},
|
|
53
|
+
"status": {
|
|
54
|
+
"name": "status",
|
|
55
|
+
"type": "text",
|
|
56
|
+
"primaryKey": false,
|
|
57
|
+
"notNull": true,
|
|
58
|
+
"default": "'pending'"
|
|
59
|
+
},
|
|
60
|
+
"provider_message_id": {
|
|
61
|
+
"name": "provider_message_id",
|
|
62
|
+
"type": "text",
|
|
63
|
+
"primaryKey": false,
|
|
64
|
+
"notNull": false
|
|
65
|
+
},
|
|
66
|
+
"provider_name": {
|
|
67
|
+
"name": "provider_name",
|
|
68
|
+
"type": "text",
|
|
69
|
+
"primaryKey": false,
|
|
70
|
+
"notNull": false
|
|
71
|
+
},
|
|
72
|
+
"error_message": {
|
|
73
|
+
"name": "error_message",
|
|
74
|
+
"type": "text",
|
|
75
|
+
"primaryKey": false,
|
|
76
|
+
"notNull": false
|
|
77
|
+
},
|
|
78
|
+
"scheduled_at": {
|
|
79
|
+
"name": "scheduled_at",
|
|
80
|
+
"type": "timestamp with time zone",
|
|
81
|
+
"primaryKey": false,
|
|
82
|
+
"notNull": false
|
|
83
|
+
},
|
|
84
|
+
"sent_at": {
|
|
85
|
+
"name": "sent_at",
|
|
86
|
+
"type": "timestamp with time zone",
|
|
87
|
+
"primaryKey": false,
|
|
88
|
+
"notNull": false
|
|
89
|
+
},
|
|
90
|
+
"job_id": {
|
|
91
|
+
"name": "job_id",
|
|
92
|
+
"type": "text",
|
|
93
|
+
"primaryKey": false,
|
|
94
|
+
"notNull": false
|
|
95
|
+
},
|
|
96
|
+
"batch_id": {
|
|
97
|
+
"name": "batch_id",
|
|
98
|
+
"type": "text",
|
|
99
|
+
"primaryKey": false,
|
|
100
|
+
"notNull": false
|
|
101
|
+
},
|
|
102
|
+
"reference_type": {
|
|
103
|
+
"name": "reference_type",
|
|
104
|
+
"type": "text",
|
|
105
|
+
"primaryKey": false,
|
|
106
|
+
"notNull": false
|
|
107
|
+
},
|
|
108
|
+
"reference_id": {
|
|
109
|
+
"name": "reference_id",
|
|
110
|
+
"type": "text",
|
|
111
|
+
"primaryKey": false,
|
|
112
|
+
"notNull": false
|
|
113
|
+
},
|
|
114
|
+
"created_at": {
|
|
115
|
+
"name": "created_at",
|
|
116
|
+
"type": "timestamp with time zone",
|
|
117
|
+
"primaryKey": false,
|
|
118
|
+
"notNull": true,
|
|
119
|
+
"default": "now()"
|
|
120
|
+
},
|
|
121
|
+
"updated_at": {
|
|
122
|
+
"name": "updated_at",
|
|
123
|
+
"type": "timestamp with time zone",
|
|
124
|
+
"primaryKey": false,
|
|
125
|
+
"notNull": true,
|
|
126
|
+
"default": "now()"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"indexes": {
|
|
130
|
+
"noti_channel_idx": {
|
|
131
|
+
"name": "noti_channel_idx",
|
|
132
|
+
"columns": [
|
|
133
|
+
{
|
|
134
|
+
"expression": "channel",
|
|
135
|
+
"isExpression": false,
|
|
136
|
+
"asc": true,
|
|
137
|
+
"nulls": "last"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"isUnique": false,
|
|
141
|
+
"concurrently": false,
|
|
142
|
+
"method": "btree",
|
|
143
|
+
"with": {}
|
|
144
|
+
},
|
|
145
|
+
"noti_status_idx": {
|
|
146
|
+
"name": "noti_status_idx",
|
|
147
|
+
"columns": [
|
|
148
|
+
{
|
|
149
|
+
"expression": "status",
|
|
150
|
+
"isExpression": false,
|
|
151
|
+
"asc": true,
|
|
152
|
+
"nulls": "last"
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"isUnique": false,
|
|
156
|
+
"concurrently": false,
|
|
157
|
+
"method": "btree",
|
|
158
|
+
"with": {}
|
|
159
|
+
},
|
|
160
|
+
"noti_recipient_idx": {
|
|
161
|
+
"name": "noti_recipient_idx",
|
|
162
|
+
"columns": [
|
|
163
|
+
{
|
|
164
|
+
"expression": "recipient",
|
|
165
|
+
"isExpression": false,
|
|
166
|
+
"asc": true,
|
|
167
|
+
"nulls": "last"
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"isUnique": false,
|
|
171
|
+
"concurrently": false,
|
|
172
|
+
"method": "btree",
|
|
173
|
+
"with": {}
|
|
174
|
+
},
|
|
175
|
+
"noti_created_at_idx": {
|
|
176
|
+
"name": "noti_created_at_idx",
|
|
177
|
+
"columns": [
|
|
178
|
+
{
|
|
179
|
+
"expression": "created_at",
|
|
180
|
+
"isExpression": false,
|
|
181
|
+
"asc": true,
|
|
182
|
+
"nulls": "last"
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
"isUnique": false,
|
|
186
|
+
"concurrently": false,
|
|
187
|
+
"method": "btree",
|
|
188
|
+
"with": {}
|
|
189
|
+
},
|
|
190
|
+
"noti_scheduled_at_idx": {
|
|
191
|
+
"name": "noti_scheduled_at_idx",
|
|
192
|
+
"columns": [
|
|
193
|
+
{
|
|
194
|
+
"expression": "scheduled_at",
|
|
195
|
+
"isExpression": false,
|
|
196
|
+
"asc": true,
|
|
197
|
+
"nulls": "last"
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"isUnique": false,
|
|
201
|
+
"concurrently": false,
|
|
202
|
+
"method": "btree",
|
|
203
|
+
"with": {}
|
|
204
|
+
},
|
|
205
|
+
"noti_job_id_idx": {
|
|
206
|
+
"name": "noti_job_id_idx",
|
|
207
|
+
"columns": [
|
|
208
|
+
{
|
|
209
|
+
"expression": "job_id",
|
|
210
|
+
"isExpression": false,
|
|
211
|
+
"asc": true,
|
|
212
|
+
"nulls": "last"
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
"isUnique": false,
|
|
216
|
+
"concurrently": false,
|
|
217
|
+
"method": "btree",
|
|
218
|
+
"with": {}
|
|
219
|
+
},
|
|
220
|
+
"noti_batch_id_idx": {
|
|
221
|
+
"name": "noti_batch_id_idx",
|
|
222
|
+
"columns": [
|
|
223
|
+
{
|
|
224
|
+
"expression": "batch_id",
|
|
225
|
+
"isExpression": false,
|
|
226
|
+
"asc": true,
|
|
227
|
+
"nulls": "last"
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
"isUnique": false,
|
|
231
|
+
"concurrently": false,
|
|
232
|
+
"method": "btree",
|
|
233
|
+
"with": {}
|
|
234
|
+
},
|
|
235
|
+
"noti_reference_idx": {
|
|
236
|
+
"name": "noti_reference_idx",
|
|
237
|
+
"columns": [
|
|
238
|
+
{
|
|
239
|
+
"expression": "reference_type",
|
|
240
|
+
"isExpression": false,
|
|
241
|
+
"asc": true,
|
|
242
|
+
"nulls": "last"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"expression": "reference_id",
|
|
246
|
+
"isExpression": false,
|
|
247
|
+
"asc": true,
|
|
248
|
+
"nulls": "last"
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
"isUnique": false,
|
|
252
|
+
"concurrently": false,
|
|
253
|
+
"method": "btree",
|
|
254
|
+
"with": {}
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"foreignKeys": {},
|
|
258
|
+
"compositePrimaryKeys": {},
|
|
259
|
+
"uniqueConstraints": {},
|
|
260
|
+
"policies": {},
|
|
261
|
+
"checkConstraints": {},
|
|
262
|
+
"isRLSEnabled": false
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"enums": {},
|
|
266
|
+
"schemas": {
|
|
267
|
+
"spfn_notification": "spfn_notification"
|
|
268
|
+
},
|
|
269
|
+
"sequences": {},
|
|
270
|
+
"roles": {},
|
|
271
|
+
"policies": {},
|
|
272
|
+
"views": {},
|
|
273
|
+
"_meta": {
|
|
274
|
+
"columns": {},
|
|
275
|
+
"schemas": {},
|
|
276
|
+
"tables": {}
|
|
277
|
+
}
|
|
278
|
+
}
|