parent
ea29e29a06
commit
607803c04f
2 changed files with 4 additions and 9 deletions
|
@ -255,7 +255,7 @@ function create_tables(Database $db)
|
|||
width INTEGER NOT NULL,
|
||||
height INTEGER NOT NULL,
|
||||
posted TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
locked BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
locked SCORE_BOOL NOT NULL DEFAULT SCORE_BOOL_N,
|
||||
FOREIGN KEY (owner_id) REFERENCES users(id) ON DELETE RESTRICT
|
||||
");
|
||||
$db->execute("CREATE INDEX images_owner_id_idx ON images(owner_id)", []);
|
||||
|
|
|
@ -32,9 +32,9 @@ class Upgrade extends Extension
|
|||
// now done again as v9 with PDO
|
||||
|
||||
if ($this->get_version("db_version") < 8) {
|
||||
$database->execute(
|
||||
"ALTER TABLE images ADD COLUMN locked BOOLEAN NOT NULL DEFAULT FALSE"
|
||||
);
|
||||
$database->execute($database->scoreql_to_sql(
|
||||
"ALTER TABLE images ADD COLUMN locked SCORE_BOOL NOT NULL DEFAULT SCORE_BOOL_N"
|
||||
));
|
||||
|
||||
$this->set_version("db_version", 8);
|
||||
}
|
||||
|
@ -197,11 +197,6 @@ class Upgrade extends Extension
|
|||
|
||||
$this->set_version("db_version", 19);
|
||||
}
|
||||
|
||||
if ($this->get_version("db_version") < 20) {
|
||||
$database->standardise_boolean("images", "locked");
|
||||
$this->set_version("db_version", 20);
|
||||
}
|
||||
}
|
||||
|
||||
public function get_priority(): int
|
||||
|
|
Reference in a new issue