選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

2012080700.sql 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. -- Updates from version 0.8
  2. DROP TABLE cache;
  3. CREATE TABLE cache (
  4. user_id integer NOT NULL default 0,
  5. cache_key varchar(128) NOT NULL default '',
  6. created datetime NOT NULL default '0000-00-00 00:00:00',
  7. data text NOT NULL
  8. );
  9. CREATE INDEX ix_cache_user_cache_key ON cache(user_id, cache_key);
  10. CREATE INDEX ix_cache_created ON cache(created);
  11. CREATE TABLE tmp_users (
  12. user_id integer NOT NULL PRIMARY KEY,
  13. username varchar(128) NOT NULL default '',
  14. mail_host varchar(128) NOT NULL default '',
  15. created datetime NOT NULL default '0000-00-00 00:00:00',
  16. last_login datetime DEFAULT NULL,
  17. language varchar(5),
  18. preferences text NOT NULL default ''
  19. );
  20. INSERT INTO tmp_users (user_id, username, mail_host, created, last_login, language, preferences)
  21. SELECT user_id, username, mail_host, created, last_login, language, preferences FROM users;
  22. DROP TABLE users;
  23. CREATE TABLE users (
  24. user_id integer NOT NULL PRIMARY KEY,
  25. username varchar(128) NOT NULL default '',
  26. mail_host varchar(128) NOT NULL default '',
  27. created datetime NOT NULL default '0000-00-00 00:00:00',
  28. last_login datetime DEFAULT NULL,
  29. language varchar(5),
  30. preferences text NOT NULL default ''
  31. );
  32. INSERT INTO users (user_id, username, mail_host, created, last_login, language, preferences)
  33. SELECT user_id, username, mail_host, created, last_login, language, preferences FROM tmp_users;
  34. CREATE UNIQUE INDEX ix_users_username ON users(username, mail_host);
  35. CREATE INDEX ix_identities_email ON identities(email, del);