forked from
slices.network/slices
Highly ambitious ATProtocol AppView service and sdks
1-- Change record table to use composite primary key (uri, slice_uri)
2-- This allows the same record to exist in multiple slices
3
4-- First, drop the existing primary key constraint
5ALTER TABLE record DROP CONSTRAINT record_pkey;
6
7-- Add the new composite primary key
8ALTER TABLE record ADD CONSTRAINT record_pkey PRIMARY KEY (uri, slice_uri);
9
10-- Update the unique index on URI to be non-unique since URIs can now appear multiple times
11-- (The existing idx_record_* indexes should still work fine for queries)