Cleaned up the PsotgreSQL upgrade tables for 0.9.3pre10

This commit is contained in:
jengo 2000-11-13 08:44:43 +00:00
parent 8f07f92003
commit 43cc63b07f
2 changed files with 65 additions and 66 deletions

View File

@ -191,7 +191,7 @@
$db->query($sql); $db->query($sql);
$sql = "CREATE TABLE news_msg ( $sql = "CREATE TABLE news_msg (
con int NOT NULL, con serial,
msg int NOT NULL, msg int NOT NULL,
uid varchar(255) DEFAULT '', uid varchar(255) DEFAULT '',
udate int DEFAULT 0, udate int DEFAULT 0,
@ -219,13 +219,13 @@
content_description varchar(255) DEFAULT '', content_description varchar(255) DEFAULT '',
content_transfer_encoding varchar(255) DEFAULT '', content_transfer_encoding varchar(255) DEFAULT '',
mime_version varchar(255) DEFAULT '', mime_version varchar(255) DEFAULT '',
msgsize int(11) DEFAULT 0, msgsize int DEFAULT 0,
msglines int(11) DEFAULT 0, msglines int DEFAULT 0,
body text NOT NULL, body text NOT NULL
unique(con,msg)
)"; )";
$db->query($sql); $db->query($sql);
$sql = "CREATE TABLE lang ( $sql = "CREATE TABLE lang (
message_id varchar(150) DEFAULT '' NOT NULL, message_id varchar(150) DEFAULT '' NOT NULL,
app_name varchar(100) DEFAULT 'common' NOT NULL, app_name varchar(100) DEFAULT 'common' NOT NULL,

View File

@ -319,10 +319,10 @@
if ($currentver == "0.9.3pre9") { if ($currentver == "0.9.3pre9") {
$sql = "CREATE TABLE news_msg ( $sql = "CREATE TABLE news_msg (
con int(11) NOT NULL, con serial,
msg int(11) NOT NULL, msg int NOT NULL,
uid varchar(255) DEFAULT '', uid varchar(255) DEFAULT '',
udate int(11) DEFAULT 0, udate int DEFAULT 0,
path varchar(255) DEFAULT '', path varchar(255) DEFAULT '',
fromadd varchar(255) DEFAULT '', fromadd varchar(255) DEFAULT '',
toadd varchar(255) DEFAULT '', toadd varchar(255) DEFAULT '',
@ -347,10 +347,9 @@
content_description varchar(255) DEFAULT '', content_description varchar(255) DEFAULT '',
content_transfer_encoding varchar(255) DEFAULT '', content_transfer_encoding varchar(255) DEFAULT '',
mime_version varchar(255) DEFAULT '', mime_version varchar(255) DEFAULT '',
msgsize int(11) DEFAULT 0, msgsize int DEFAULT 0,
msglines int(11) DEFAULT 0, msglines int DEFAULT 0,
body text NOT NULL, body text NOT NULL
primary key(con,msg)
)"; )";
$db->query($sql); $db->query($sql);
$currentver = "0.9.3pre10"; $currentver = "0.9.3pre10";