Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- move TRUNCATE before CREATE INDEX (#1486362)

  • Loading branch information...
commit f47e2dc5ea51853ade73565261db43f36ceeee92 1 parent 3f5cce6
@alecpl alecpl authored
View
4 SQL/mysql.update.sql
@@ -47,11 +47,11 @@ ALTER TABLE `users`
-- Updates from version 0.3-stable
+TRUNCATE `messages`;
+
ALTER TABLE `messages`
ADD INDEX `index_index` (`user_id`, `cache_key`, `idx`);
-TRUNCATE `messages`;
-
ALTER TABLE `session`
CHANGE `vars` `vars` MEDIUMTEXT NOT NULL;
View
2  SQL/postgres.update.sql
@@ -39,7 +39,7 @@ ALTER TABLE messages ALTER del TYPE smallint;
-- Updates from version 0.3-stable
-CREATE INDEX messages_index_idx ON messages (user_id, cache_key, idx);
TRUNCATE messages;
+CREATE INDEX messages_index_idx ON messages (user_id, cache_key, idx);
DROP INDEX contacts_user_id_idx;
CREATE INDEX contacts_user_id_idx ON contacts (user_id, email);
View
2  SQL/sqlite.update.sql
@@ -37,9 +37,9 @@ CREATE INDEX ix_cache_created ON cache (created);
-- Updates from version 0.3-stable
+TRUNCATE messages;
DROP INDEX ix_messages_user_cache_uid;
CREATE UNIQUE INDEX ix_messages_user_cache_uid ON messages (user_id,cache_key,uid);
CREATE INDEX ix_messages_index ON messages (user_id,cache_key,idx);
-TRUNCATE messages;
DROP INDEX ix_contacts_user_id;
CREATE INDEX ix_contacts_user_id ON contacts(user_id, email);
Please sign in to comment.
Something went wrong with that request. Please try again.