File: db_update_0.8-alpha4_0.8-alpha5_sqlite.sql

package info (click to toggle)
serendipity 1.0.4-1%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 14,692 kB
  • ctags: 10,206
  • sloc: php: 83,899; sql: 1,024; sh: 597; makefile: 56
file content (38 lines) | stat: -rw-r--r-- 1,612 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
create table {PREFIX}tempcomments (
  id {AUTOINCREMENT} {PRIMARY},
  entry_id int(10) {UNSIGNED} not null default '0',
  parent_id int(10) {UNSIGNED} not null default '0',
  timestamp int(10) {UNSIGNED} default null,
  title varchar(150) default null,
  author varchar(80) default null,
  email varchar(200) default null,
  url varchar(200) default null,
  ip varchar(15) default null,
  body text,
  type varchar(100) default 'regular',
  subscribed {BOOLEAN},
  status varchar(50) not null
);

INSERT INTO {PREFIX}tempcomments (id, entry_id, parent_id, timestamp, title, author, email, url, ip, body, type, subscribed, status) SELECT id, entry_id, parent_id, timestamp, title, author, email, url, ip, body, type, subscribed, status FROM {PREFIX}comments;
DROP TABLE {PREFIX}comments;

create table {PREFIX}comments (
  id {AUTOINCREMENT} {PRIMARY},
  entry_id int(10) {UNSIGNED} not null default '0',
  parent_id int(10) {UNSIGNED} not null default '0',
  timestamp int(10) {UNSIGNED} default null,
  title varchar(150) default null,
  author varchar(80) default null,
  email varchar(200) default null,
  url varchar(200) default null,
  ip varchar(15) default null,
  body text,
  type varchar(100) default 'regular',
  subscribed {BOOLEAN},
  status varchar(50) not null,
  referer varchar(200) default null
);

INSERT INTO {PREFIX}comments (id, entry_id, parent_id, timestamp, title, author, email, url, ip, body, type, subscribed, status) SELECT id, entry_id, parent_id, timestamp, title, author, email, url, ip, body, type, subscribed, status FROM {PREFIX}tempcomments;
DROP TABLE {PREFIX}tempcomments;