Skip to content
Browse files

- move TRUNCATE before CREATE INDEX (#1486362)

  • Loading branch information...
1 parent 3f5cce6 commit f47e2dc5ea51853ade73565261db43f36ceeee92 @alecpl alecpl committed Dec 11, 2009
Showing with 4 additions and 4 deletions.
  1. +2 −2 SQL/mysql.update.sql
  2. +1 −1 SQL/postgres.update.sql
  3. +1 −1 SQL/sqlite.update.sql
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);

0 comments on commit f47e2dc

Please sign in to comment.
Something went wrong with that request. Please try again.