2015-12-10 18:51:15 +01:00
|
|
|
/* Copyright 2015 OpenMarket Ltd
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2016-01-04 15:05:37 +01:00
|
|
|
CREATE TABLE IF NOT EXISTS event_push_actions(
|
2015-12-16 19:42:09 +01:00
|
|
|
room_id TEXT NOT NULL,
|
2015-12-10 18:51:15 +01:00
|
|
|
event_id TEXT NOT NULL,
|
|
|
|
user_id TEXT NOT NULL,
|
|
|
|
profile_tag VARCHAR(32),
|
|
|
|
actions TEXT NOT NULL,
|
2015-12-16 19:42:09 +01:00
|
|
|
CONSTRAINT event_id_user_id_profile_tag_uniqueness UNIQUE (room_id, event_id, user_id, profile_tag)
|
2015-12-10 18:51:15 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
|
2016-01-04 15:05:37 +01:00
|
|
|
CREATE INDEX event_push_actions_room_id_event_id_user_id_profile_tag on event_push_actions(room_id, event_id, user_id, profile_tag);
|
2016-01-25 16:30:32 +01:00
|
|
|
CREATE INDEX event_push_actions_room_id_user_id on event_push_actions(room_id, user_id);
|