log every ext version change

This commit is contained in:
Shish
2019-11-03 19:04:57 +00:00
parent 4f0ee38508
commit 494ba15a70
10 changed files with 77 additions and 73 deletions

View File

@@ -151,14 +151,14 @@ class Trash extends Extension
public function onDatabaseUpgrade(DatabaseUpgradeEvent $event)
{
global $database, $config;
global $database;
if ($config->get_int(TrashConfig::VERSION) < 1) {
if ($this->get_version(TrashConfig::VERSION) < 1) {
$database->Execute($database->scoreql_to_sql(
"ALTER TABLE images ADD COLUMN trash SCORE_BOOL NOT NULL DEFAULT SCORE_BOOL_N"
));
$database->Execute("CREATE INDEX images_trash_idx ON images(trash)");
$config->set_int(TrashConfig::VERSION, 1);
$this->set_version(TrashConfig::VERSION, 1);
}
}
}