SimpleCloudNotifier/scnserver/db/schema/primary_migration_9_10.sql
Mike Schwörer 1f0f280286
All checks were successful
Build Docker and Deploy / Run Unit-Tests (push) Has been skipped
Build Docker and Deploy / Build Docker Container (push) Successful in 41s
Build Docker and Deploy / Deploy to Server (push) Successful in 10s
Fix ListChannels(owned) returning channels multiple (if there are deleted subscriptions) [skip-tests]
2025-04-18 16:08:25 +02:00

11 lines
541 B
SQL

-- (only add indizes)
--
------------------------------------------------------------------------------------------------------------------------
CREATE UNIQUE INDEX "idx_subscriptions_ref2" ON subscriptions (subscriber_user_id, channel_owner_user_id, channel_id) WHERE deleted=0;
CREATE UNIQUE INDEX "idx_subscriptions_ref3" ON subscriptions (subscriber_user_id, channel_id) WHERE deleted=0;
------------------------------------------------------------------------------------------------------------------------