You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2008030300.sql 1.0KB

123456789101112131415161718
  1. -- Updates from version 0.1-stable to 0.1.1
  2. CREATE INDEX cache_user_id_idx ON cache (user_id, cache_key);
  3. CREATE INDEX contacts_user_id_idx ON contacts (user_id);
  4. CREATE INDEX identities_user_id_idx ON identities (user_id);
  5. CREATE INDEX users_username_id_idx ON users (username);
  6. CREATE INDEX users_alias_id_idx ON users (alias);
  7. -- added ON DELETE/UPDATE actions
  8. ALTER TABLE messages DROP CONSTRAINT messages_user_id_fkey;
  9. ALTER TABLE messages ADD FOREIGN KEY (user_id) REFERENCES users(user_id) ON DELETE CASCADE ON UPDATE CASCADE;
  10. ALTER TABLE identities DROP CONSTRAINT identities_user_id_fkey;
  11. ALTER TABLE identities ADD FOREIGN KEY (user_id) REFERENCES users(user_id) ON DELETE CASCADE ON UPDATE CASCADE;
  12. ALTER TABLE contacts DROP CONSTRAINT contacts_user_id_fkey;
  13. ALTER TABLE contacts ADD FOREIGN KEY (user_id) REFERENCES users(user_id) ON DELETE CASCADE ON UPDATE CASCADE;
  14. ALTER TABLE cache DROP CONSTRAINT cache_user_id_fkey;
  15. ALTER TABLE cache ADD FOREIGN KEY (user_id) REFERENCES users(user_id) ON DELETE CASCADE ON UPDATE CASCADE;