File: db_update_0.8-alpha11_0.8-alpha12_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 (31 lines) | stat: -rw-r--r-- 1,405 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
create table {PREFIX}tempauthors (
  realname varchar(255) NOT NULL default '',
  username varchar(20) default null,
  password varchar(32) default null,
  authorid {AUTOINCREMENT} {PRIMARY},
  mail_comments int(1) default '1',
  mail_trackbacks int(1) default '1',
  email varchar(128) not null default '',
  userlevel int(4) {UNSIGNED} not null default '0',
  right_publish int(1) default '1'
);

INSERT INTO {PREFIX}tempauthors (username, password, authorid, mail_comments, mail_trackbacks, email, userlevel, right_publish) SELECT username, password, authorid, mail_comments, mail_trackbacks, email, userlevel, right_publish FROM {PREFIX}authors;
DROP TABLE {PREFIX}authors;

create table {PREFIX}authors (
  realname varchar(255) NOT NULL default '',
  username varchar(20) default null,
  password varchar(32) default null,
  authorid {AUTOINCREMENT} {PRIMARY},
  mail_comments int(1) default '1',
  mail_trackbacks int(1) default '1',
  email varchar(128) not null default '',
  userlevel int(4) {UNSIGNED} not null default '0',
  right_publish int(1) default '1'
);

INSERT INTO {PREFIX}authors (username, password, authorid, mail_comments, mail_trackbacks, email, userlevel, right_publish) SELECT username, password, authorid, mail_comments, mail_trackbacks, email, userlevel, right_publish FROM {PREFIX}tempauthors;
DROP TABLE {PREFIX}tempauthors;

UPDATE {PREFIX}authors SET realname = username;