From 82bc887767693b09a70910c0bc435942bcd48cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Sat, 14 Jan 2023 00:48:51 +0100 Subject: [PATCH] Move to string-ids for all entities (compat translation for existing data) --- .../inspectionProfiles/Project_Default.xml | 1 + scnserver/README.md | 12 +- scnserver/api/handler/api.go | 68 ++-- scnserver/api/handler/compat.go | 137 ++++++- scnserver/api/handler/message.go | 66 +--- scnserver/api/router.go | 20 +- scnserver/cmd/scnserver/main.go | 6 +- scnserver/config.go | 16 + scnserver/db/cursortoken/token.go | 12 +- scnserver/db/impl/logs/database.go | 2 +- scnserver/db/impl/logs/schema/schema_1.ddl | 5 +- scnserver/db/impl/primary/channels.go | 24 +- scnserver/db/impl/primary/clients.go | 14 +- scnserver/db/impl/primary/compat.go | 100 +++++ scnserver/db/impl/primary/database.go | 2 +- scnserver/db/impl/primary/deliveries.go | 40 +- scnserver/db/impl/primary/messages.go | 28 +- scnserver/db/impl/primary/schema/schema_1.ddl | 4 +- scnserver/db/impl/primary/schema/schema_2.ddl | 4 +- scnserver/db/impl/primary/schema/schema_3.ddl | 81 ++-- scnserver/db/impl/primary/subscriptions.go | 24 +- scnserver/db/impl/primary/users.go | 12 +- scnserver/db/impl/requests/database.go | 2 +- scnserver/db/impl/requests/requestlogs.go | 12 +- .../db/impl/requests/schema/schema_1.ddl | 9 +- scnserver/jobs/DeliveryRetryJob.go | 16 +- scnserver/jobs/RequestLogCollectorJob.go | 11 +- scnserver/logic/application.go | 2 +- scnserver/models/delivery.go | 10 +- scnserver/models/ids.go | 362 ++++++++++++++++-- scnserver/models/message.go | 62 +-- scnserver/models/messagefilter.go | 2 +- scnserver/push/firebase.go | 2 +- scnserver/swagger/swagger.json | 62 +-- scnserver/swagger/swagger.yaml | 60 +-- scnserver/test/channel_test.go | 92 ++--- scnserver/test/compat_test.go | 2 + scnserver/test/message_test.go | 18 +- scnserver/test/send_test.go | 277 +++++++++----- scnserver/test/util/factory.go | 28 +- scnserver/test/util/internals.go | 45 +++ scnserver/test/util/webserver.go | 7 +- 42 files changed, 1218 insertions(+), 541 deletions(-) create mode 100644 scnserver/db/impl/primary/compat.go create mode 100644 scnserver/test/util/internals.go diff --git a/scnserver/.idea/inspectionProfiles/Project_Default.xml b/scnserver/.idea/inspectionProfiles/Project_Default.xml index 4696d94..c1d0146 100644 --- a/scnserver/.idea/inspectionProfiles/Project_Default.xml +++ b/scnserver/.idea/inspectionProfiles/Project_Default.xml @@ -7,5 +7,6 @@