1-- rename entries.comments_enabled column to entries.commentstatus 2CREATE TEMPORARY TABLE temp_entries ( 3 pid PRIMARY KEY, 4 page, 5 title, 6 blog, 7 image, 8 created INTEGER, 9 lastmod INTEGER, 10 author, 11 login, 12 mail 13); 14INSERT INTO temp_entries 15 SELECT pid, page, title, blog, image, created, lastmod, author, login, mail 16 FROM entries 17; 18 19DROP TABLE entries; 20CREATE TABLE entries ( 21 pid PRIMARY KEY, 22 page, 23 title, 24 blog, 25 image, 26 created INTEGER, 27 lastmod INTEGER, 28 author, 29 login, 30 mail, 31 commentstatus 32); 33CREATE UNIQUE INDEX idx_entries_pid ON entries(pid); 34CREATE INDEX idx_entries_title ON entries(title); 35CREATE INDEX idx_entries_created ON entries(created); 36CREATE INDEX idx_entries_blog ON entries(blog); 37 38INSERT INTO entries 39 SELECT pid, page, title, blog, image, created, lastmod, author, login, mail, 'enabled' 40 FROM temp_entries 41; 42DROP TABLE temp_entries; 43