bumped the tag char limit to 255
there wasn't really much reason to have this so low, and this puts it to the same limit as other booru software
This commit is contained in:
parent
9069b0c1fb
commit
b89dd52b47
1 changed files with 20 additions and 0 deletions
|
@ -107,6 +107,26 @@ class Upgrade extends Extension {
|
|||
log_info("upgrade", "Database at version 13");
|
||||
$config->set_bool("in_upgrade", false);
|
||||
}
|
||||
|
||||
if($config->get_int("db_version") < 14) {
|
||||
$config->set_bool("in_upgrade", true);
|
||||
$config->set_int("db_version", 14);
|
||||
|
||||
log_info("upgrade", "Changing tag column to VARCHAR(255)");
|
||||
if($database->get_driver_name() == 'pgsql') {
|
||||
$database->execute('ALTER TABLE tags ALTER COLUMN tag SET DATA TYPE VARCHAR(255)');
|
||||
$database->execute('ALTER TABLE aliases ALTER COLUMN oldtag SET DATA TYPE VARCHAR(255)');
|
||||
$database->execute('ALTER TABLE aliases ALTER COLUMN newtag SET DATA TYPE VARCHAR(255)');
|
||||
}
|
||||
else if($database->get_driver_name() == 'mysql') {
|
||||
$database->execute('ALTER TABLE tags MODIFY COLUMN tag VARCHAR(255) NOT NULL');
|
||||
$database->execute('ALTER TABLE aliases MODIFY COLUMN oldtag VARCHAR(255) NOT NULL');
|
||||
$database->execute('ALTER TABLE aliases MODIFY COLUMN newtag VARCHAR(255) NOT NULL');
|
||||
}
|
||||
|
||||
log_info("upgrade", "Database at version 14");
|
||||
$config->set_bool("in_upgrade", false);
|
||||
}
|
||||
}
|
||||
|
||||
public function get_priority() {return 5;}
|
||||
|
|
Reference in a new issue