fixes
This commit is contained in:
parent
e37531f26a
commit
fb7e14ad21
@ -70,9 +70,9 @@ class MySQL extends DBEngine {
|
||||
public function create_table_sql($name, $data) {
|
||||
$data = str_replace("SCORE_AIPK", "INTEGER PRIMARY KEY auto_increment", $data);
|
||||
$data = str_replace("SCORE_INET", "CHAR(15)", $data);
|
||||
$data = str_replace("SCORE_BOOL", "ENUM('Y', 'N')", $data);
|
||||
$data = str_replace("SCORE_BOOL_Y", "'Y'", $data);
|
||||
$data = str_replace("SCORE_BOOL_N", "'N'", $data);
|
||||
$data = str_replace("SCORE_BOOL", "ENUM('Y', 'N')", $data);
|
||||
$data = str_replace("SCORE_NOW", "\"1970-01-01\"", $data);
|
||||
$ctes = "TYPE=InnoDB DEFAULT CHARSET='utf8'";
|
||||
return "CREATE TABLE $name ($data) $ctes";
|
||||
@ -87,9 +87,9 @@ class PostgreSQL extends DBEngine {
|
||||
public function create_table_sql($name, $data) {
|
||||
$data = str_replace("SCORE_AIPK", "SERIAL PRIMARY KEY", $data);
|
||||
$data = str_replace("SCORE_INET", "INET", $data);
|
||||
$data = str_replace("SCORE_BOOL", "BOOL", $data);
|
||||
$data = str_replace("SCORE_BOOL_Y", "'t'", $data);
|
||||
$data = str_replace("SCORE_BOOL_N", "'f'", $data);
|
||||
$data = str_replace("SCORE_BOOL", "BOOL", $data);
|
||||
$data = str_replace("SCORE_NOW", "current_time", $data);
|
||||
return "CREATE TABLE $name ($data)";
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ function create_tables($dsn) { // {{{
|
||||
$db->execute($engine->create_table_sql("tags", "
|
||||
id SCORE_AIPK,
|
||||
tag VARCHAR(64) NOT NULL,
|
||||
count NOT NULL DEFAULT 0,
|
||||
count INTEGER NOT NULL DEFAULT 0,
|
||||
INDEX(tag)
|
||||
"));
|
||||
$db->execute($engine->create_table_sql("image_tags", "
|
||||
|
Loading…
x
Reference in New Issue
Block a user