#1485125: added index on messages.created
| | |
| | | `headers` text NOT NULL, |
| | | `structure` text, |
| | | PRIMARY KEY (`message_id`), |
| | | INDEX `created_index` (`created`), |
| | | UNIQUE `uniqueness` (`user_id`, `cache_key`, `uid`) |
| | | ); |
| | | |
| | |
| | | MODIFY `organization` varchar(128) NOT NULL DEFAULT '', |
| | | MODIFY `name` varchar(128) NOT NULL, |
| | | MODIFY `email` varchar(128) NOT NULL; |
| | | |
| | | -- Updates from version 0.2-alpha |
| | | |
| | | ALTER TABLE `messages` |
| | | ADD INDEX `created_index` (`created`); |
| | |
| | | `headers` text NOT NULL, |
| | | `structure` text, |
| | | PRIMARY KEY(`message_id`), |
| | | INDEX `created_index` (`created`), |
| | | UNIQUE `uniqueness` (`user_id`, `cache_key`, `uid`), |
| | | CONSTRAINT `user_id_fk_messages` FOREIGN KEY (`user_id`) |
| | | REFERENCES `users`(`user_id`) |
| | |
| | | -- Name: messages; Type: TABLE; Schema: public; Owner: postgres |
| | | -- |
| | | |
| | | CREATE TABLE "messages" ( |
| | | CREATE TABLE messages ( |
| | | message_id integer DEFAULT nextval('message_ids'::text) PRIMARY KEY, |
| | | user_id integer NOT NULL REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE, |
| | | del integer DEFAULT 0 NOT NULL, |
| | |
| | | structure text |
| | | ); |
| | | |
| | | ALTER TABLE "messages" ADD UNIQUE (user_id, cache_key, uid); |
| | | ALTER TABLE messages ADD UNIQUE (user_id, cache_key, uid); |
| | | CREATE INDEX messages_created_idx ON messages (created); |
| | |
| | | ALTER TABLE contacts ADD FOREIGN KEY (user_id) REFERENCES users(user_id) ON DELETE CASCADE ON UPDATE CASCADE; |
| | | ALTER TABLE cache DROP CONSTRAINT cache_user_id_fkey; |
| | | ALTER TABLE cache ADD FOREIGN KEY (user_id) REFERENCES users(user_id) ON DELETE CASCADE ON UPDATE CASCADE; |
| | | |
| | | -- Updates from version 0.2-alpha |
| | | |
| | | CREATE INDEX messages_created_idx ON messages (created); |
| | |
| | | ); |
| | | |
| | | CREATE INDEX ix_messages_user_cache_uid ON messages(user_id,cache_key,uid); |
| | | CREATE INDEX ix_messages_created ON messages (created); |
| | |
| | | |
| | | CREATE INDEX ix_users_username ON users(username); |
| | | CREATE INDEX ix_users_alias ON users(alias); |
| | | |
| | | -- Updates from version 0.2-alpha |
| | | |
| | | CREATE INDEX ix_messages_created ON messages (created); |