Skip to content

Commit

Permalink
Merge pull request #117 from rfcx/feature/CS-392-detection-review-res…
Browse files Browse the repository at this point in the history
…tructurization

CS-392 detection review restructuring
  • Loading branch information
rassokhin-s authored Feb 2, 2021
2 parents 5eb865e + 9a3de59 commit f4bcc3a
Show file tree
Hide file tree
Showing 29 changed files with 1,405 additions and 1,316 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@


### Features
* **core:** use `annotations` instead of `detection_reviews` ([CS-392](https://jira.rfcx.org/browse/CS-392))
* **core:** update events endpoints to support `systemUser` ([CS-105](https://jira.rfcx.org/browse/CS-105))
* **core:** update classifier `last_executed_at` when saving detections ([CS-368](https://jira.rfcx.org/browse/CS-368))


### Performance Improvements
* **core:** drop `id` column on `detections` table ([CS-392](https://jira.rfcx.org/browse/CS-392))
* **core:** change `confidence` column on `detections` table from `FLOAT` to `REAL` ([CS-392](https://jira.rfcx.org/browse/CS-392))
* **core:** drop `first_detection_id` and `last_detection_id` columns on `events` table ([CS-392](https://jira.rfcx.org/browse/CS-392))


<a name="1.0.0"></a>
## 1.0.0 (2021-01-30)

Expand Down
12 changes: 12 additions & 0 deletions DEPLOYMENT_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# API Deployment Notes

## v1.0.1

- Delete `20200708000001-create-detection-review.js` from `sequelize.migrations` table in TimescaleDB.
- Delete `20200708000001-create-detection-review copy.js` from `sequelize.migrations` table in TimescaleDB.
- Drop `public.detection_reviews` table in TimescaleDB.
- Run `npm run sync-timescale` to apply the following migrations:
- `20210130000001-add-is-manual-is-positive-to-annotaions`
- `20210130000002-change-freq-min-freq-max-on-annotations`
- `20210130000003-drop-id-on-detections`
- `20210130000004-change-confidence-on-detections`
- `20210130000005-drop-detecton-ids-on-events`

## v1.0.0

_None_
24 changes: 12 additions & 12 deletions bin/timescaledb/seeds/30-annotations.sql
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, created_at, updated_at) VALUES ('89098e06-d59f-455f-a90c-c0b373208d32', 'lgndfyp1enmu', 303, '2020-05-24 15:34:05.500', '2020-05-24 15:34:09.000', 2000, 7800, 8, 8, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, created_at, updated_at) VALUES ('5bf7dd68-ef61-452d-bc42-e28ae1de230d', 'lgndfyp1enmu', 303, '2020-05-24 15:38:45.000', '2020-05-24 15:39:09.000', 2600, 6800, 8, 8, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, created_at, updated_at) VALUES ('e309c97c-01ed-4db3-a3f2-946904c62a02', 'lgndfyp1enmu', 303, '2020-05-24 15:39:22.500', '2020-05-24 15:39:25.500', 2900, 8900, 8, 8, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, created_at, updated_at) VALUES ('eda9c5c7-de13-4d5b-96bd-03ecd9158490', 'lgndfyp1enmu', 303, '2020-05-24 15:35:03.000', '2020-05-24 15:35:29.000', 1800, 8100, 8, 8, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, created_at, updated_at) VALUES ('331d3d7b-1788-4ee9-8e7c-77516a280be4', 'lgndfyp1enmu', 303, '2020-05-24 19:10:53.500', '2020-05-24 19:12:05.500', 2000, 9200, 8, 8, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, created_at, updated_at) VALUES ('3e426fa1-7f51-42d2-8361-b69e145f5169', 'lgndfyp1enmu', 303, '2020-05-24 19:29:00.000', '2020-05-24 19:29:16.750', 1800, 7400, 8, 8, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, created_at, updated_at) VALUES ('df51db27-bf11-4b1a-9493-d7ebb572c181', 'lgndfyp1enmu', 345, '2020-05-24 15:30:45.000', '2020-05-24 15:30:59.500', 7700, 12000, 8, 8, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, created_at, updated_at) VALUES ('bbcb7e6c-d09c-4845-9245-2328662eaad9', 'lgndfyp1enmu', 345, '2020-05-24 15:35:33.500', '2020-05-24 15:35:51.500', 9000, 13500, 8, 8, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, created_at, updated_at) VALUES ('768d27ef-ea77-4c1e-9841-78dd5525dba8', 'ev69cht895gc', 268, '2020-05-24 12:25:05.500', '2020-05-24 12:25:14.000', 1300, 5220, 8, 8, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, created_at, updated_at) VALUES ('2301646d-0654-4467-affd-9b6709be5358', 'ev69cht895gc', 268, '2020-05-24 12:28:45.000', '2020-05-24 12:28:49.000', 600, 5800, 8, 8, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, created_at, updated_at) VALUES ('2301646d-0654-4467-affd-9b6709be5123', 'ev69cht895gc', 268, '2020-05-25 12:00:21.750', '2020-05-25 12:01:25.500', 900, 5900, 8, 8, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, created_at, updated_at) VALUES ('2301646d-0654-4467-affd-9b6709be5124', 'ev69cht895gc', 353, '2020-05-25 12:15:00.000', '2020-05-25 12:15:05.000', 300, 10000, 1, 1, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, is_manual, is_positive, created_at, updated_at) VALUES ('89098e06-d59f-455f-a90c-c0b373208d32', 'lgndfyp1enmu', 303, '2020-05-24 15:34:05.500', '2020-05-24 15:34:09.000', 2000, 7800, 8, 8, true, true, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, is_manual, is_positive, created_at, updated_at) VALUES ('5bf7dd68-ef61-452d-bc42-e28ae1de230d', 'lgndfyp1enmu', 303, '2020-05-24 15:38:45.000', '2020-05-24 15:39:09.000', 2600, 6800, 8, 8, true, true, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, is_manual, is_positive, created_at, updated_at) VALUES ('e309c97c-01ed-4db3-a3f2-946904c62a02', 'lgndfyp1enmu', 303, '2020-05-24 15:39:22.500', '2020-05-24 15:39:25.500', 2900, 8900, 8, 8, true, true, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, is_manual, is_positive, created_at, updated_at) VALUES ('eda9c5c7-de13-4d5b-96bd-03ecd9158490', 'lgndfyp1enmu', 303, '2020-05-24 15:35:03.000', '2020-05-24 15:35:29.000', 1800, 8100, 8, 8, true, true, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, is_manual, is_positive, created_at, updated_at) VALUES ('331d3d7b-1788-4ee9-8e7c-77516a280be4', 'lgndfyp1enmu', 303, '2020-05-24 19:10:53.500', '2020-05-24 19:12:05.500', 2000, 9200, 8, 8, true, true, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, is_manual, is_positive, created_at, updated_at) VALUES ('3e426fa1-7f51-42d2-8361-b69e145f5169', 'lgndfyp1enmu', 303, '2020-05-24 19:29:00.000', '2020-05-24 19:29:16.750', 1800, 7400, 8, 8, true, true, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, is_manual, is_positive, created_at, updated_at) VALUES ('df51db27-bf11-4b1a-9493-d7ebb572c181', 'lgndfyp1enmu', 345, '2020-05-24 15:30:45.000', '2020-05-24 15:30:59.500', 7700, 12000, 8, 8, true, true, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, is_manual, is_positive, created_at, updated_at) VALUES ('bbcb7e6c-d09c-4845-9245-2328662eaad9', 'lgndfyp1enmu', 345, '2020-05-24 15:35:33.500', '2020-05-24 15:35:51.500', 9000, 13500, 8, 8, true, true, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, is_manual, is_positive, created_at, updated_at) VALUES ('768d27ef-ea77-4c1e-9841-78dd5525dba8', 'ev69cht895gc', 268, '2020-05-24 12:25:05.500', '2020-05-24 12:25:14.000', 1300, 5220, 8, 8, true, true, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, is_manual, is_positive, created_at, updated_at) VALUES ('2301646d-0654-4467-affd-9b6709be5358', 'ev69cht895gc', 268, '2020-05-24 12:28:45.000', '2020-05-24 12:28:49.000', 600, 5800, 8, 8, true, true, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, is_manual, is_positive, created_at, updated_at) VALUES ('2301646d-0654-4467-affd-9b6709be5123', 'ev69cht895gc', 268, '2020-05-25 12:00:21.750', '2020-05-25 12:01:25.500', 900, 5900, 8, 8, true, true, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
INSERT INTO public."annotations" (id, stream_id, classification_id, start, "end", frequency_min, frequency_max, created_by_id, updated_by_id, is_manual, is_positive, created_at, updated_at) VALUES ('2301646d-0654-4467-affd-9b6709be5124', 'ev69cht895gc', 353, '2020-05-25 12:15:00.000', '2020-05-25 12:15:05.000', 300, 10000, 1, 1, true, true, '2020-05-29 11:30:00.000', '2020-05-29 11:30:00.000');
Loading

0 comments on commit f4bcc3a

Please sign in to comment.