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

2010042300.sql 1.3KB

1234567891011121314151617181920212223242526272829303132333435
  1. -- Updates from version 0.4-beta
  2. CREATE TABLE tmp_users (
  3. user_id integer NOT NULL PRIMARY KEY,
  4. username varchar(128) NOT NULL default '',
  5. mail_host varchar(128) NOT NULL default '',
  6. alias varchar(128) NOT NULL default '',
  7. created datetime NOT NULL default '0000-00-00 00:00:00',
  8. last_login datetime NOT NULL default '0000-00-00 00:00:00',
  9. language varchar(5),
  10. preferences text NOT NULL default ''
  11. );
  12. INSERT INTO tmp_users (user_id, username, mail_host, alias, created, last_login, language, preferences)
  13. SELECT user_id, username, mail_host, alias, created, last_login, language, preferences FROM users;
  14. DROP TABLE users;
  15. CREATE TABLE users (
  16. user_id integer NOT NULL PRIMARY KEY,
  17. username varchar(128) NOT NULL default '',
  18. mail_host varchar(128) NOT NULL default '',
  19. alias varchar(128) NOT NULL default '',
  20. created datetime NOT NULL default '0000-00-00 00:00:00',
  21. last_login datetime DEFAULT NULL,
  22. language varchar(5),
  23. preferences text NOT NULL default ''
  24. );
  25. INSERT INTO users (user_id, username, mail_host, alias, created, last_login, language, preferences)
  26. SELECT user_id, username, mail_host, alias, created, last_login, language, preferences FROM tmp_users;
  27. CREATE INDEX ix_users_username ON users(username);
  28. CREATE INDEX ix_users_alias ON users(alias);
  29. DROP TABLE tmp_users;