unleash-server 4.22.0-beta.4 → 4.22.0-beta.6
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.
- package/dist/migrations/20230222154915-create-notiications-table.js +4 -4
- package/dist/migrations/20230224093446-drop-createdBy-from-notifications-table.d.ts +2 -0
- package/dist/migrations/20230224093446-drop-createdBy-from-notifications-table.js +14 -0
- package/dist/migrations/20230224093446-drop-createdBy-from-notifications-table.js.map +1 -0
- package/package.json +1 -1
|
@@ -3,15 +3,15 @@ exports.up = function (db, cb) {
|
|
|
3
3
|
db.runSql(`
|
|
4
4
|
CREATE TABLE IF NOT EXISTS notifications (
|
|
5
5
|
id SERIAL PRIMARY KEY,
|
|
6
|
-
event_id INTEGER NOT NULL REFERENCES events (id),
|
|
7
|
-
created_by INTEGER NOT NULL REFERENCES users (id),
|
|
6
|
+
event_id INTEGER NOT NULL REFERENCES events (id) ON DELETE CASCADE,
|
|
7
|
+
created_by INTEGER NOT NULL REFERENCES users (id) ON DELETE CASCADE,
|
|
8
8
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now()
|
|
9
9
|
);
|
|
10
10
|
|
|
11
11
|
CREATE TABLE if not exists user_notifications
|
|
12
12
|
(
|
|
13
|
-
notification_id INTEGER NOT NULL REFERENCES notifications (id),
|
|
14
|
-
user_id INTEGER NOT NULL REFERENCES users (id),
|
|
13
|
+
notification_id INTEGER NOT NULL REFERENCES notifications (id) ON DELETE CASCADE,
|
|
14
|
+
user_id INTEGER NOT NULL REFERENCES users (id) ON DELETE CASCADE,
|
|
15
15
|
read_at TIMESTAMP WITH TIME ZONE,
|
|
16
16
|
PRIMARY KEY (notification_id, user_id)
|
|
17
17
|
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
exports.up = function (db, cb) {
|
|
3
|
+
db.runSql(`
|
|
4
|
+
ALTER TABLE notifications
|
|
5
|
+
DROP COLUMN IF EXISTS created_by;
|
|
6
|
+
`, cb);
|
|
7
|
+
};
|
|
8
|
+
exports.down = function (db, cb) {
|
|
9
|
+
db.runSql(`
|
|
10
|
+
ALTER TABLE notifications
|
|
11
|
+
ADD COLUMN IF NOT EXISTS created_by INTEGER REFERENCES users (id);
|
|
12
|
+
`, cb);
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=20230224093446-drop-createdBy-from-notifications-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"20230224093446-drop-createdBy-from-notifications-table.js","sourceRoot":"","sources":["../../src/migrations/20230224093446-drop-createdBy-from-notifications-table.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,CAAC,EAAE,GAAG,UAAU,EAAE,EAAE,EAAE;IACzB,EAAE,CAAC,MAAM,CACL;;;SAGC,EACD,EAAE,CACL,CAAC;AACN,CAAC,CAAC;AAEF,OAAO,CAAC,IAAI,GAAG,UAAU,EAAE,EAAE,EAAE;IAC3B,EAAE,CAAC,MAAM,CACL;;;SAGC,EACD,EAAE,CACL,CAAC;AACN,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unleash-server",
|
|
3
3
|
"description": "Unleash is an enterprise ready feature toggles service. It provides different strategies for handling feature toggles.",
|
|
4
|
-
"version": "4.22.0-beta.
|
|
4
|
+
"version": "4.22.0-beta.6",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unleash",
|
|
7
7
|
"feature toggle",
|