diff --git a/common.php b/common.php index 3ea4681c..fa499419 100644 --- a/common.php +++ b/common.php @@ -27,7 +27,7 @@ if (version_compare(phpversion(), '8.1', '<')) die('PHP version 8.1 or higher is const MYAAC = true; const MYAAC_VERSION = '2.0-dev'; -const DATABASE_VERSION = 50; +const DATABASE_VERSION = 51; const TABLE_PREFIX = 'myaac_'; define('START_TIME', microtime(true)); define('MYAAC_OS', stripos(PHP_OS, 'WIN') === 0 ? 'WINDOWS' : (strtoupper(PHP_OS) === 'DARWIN' ? 'MAC' : 'LINUX')); diff --git a/install/includes/schema.sql b/install/includes/schema.sql index 3d97be16..71993838 100644 --- a/install/includes/schema.sql +++ b/install/includes/schema.sql @@ -43,8 +43,8 @@ CREATE TABLE IF NOT EXISTS `myaac_changelog` CREATE TABLE IF NOT EXISTS `myaac_config` ( `id` int NOT NULL AUTO_INCREMENT, - `name` varchar(30) NOT NULL, - `value` varchar(1000) NOT NULL, + `name` varchar(255) NOT NULL, + `value` varchar(10000) NOT NULL, PRIMARY KEY (`id`), UNIQUE (`name`) ) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8mb4; diff --git a/system/migrations/51.php b/system/migrations/51.php new file mode 100644 index 00000000..dcb4341f --- /dev/null +++ b/system/migrations/51.php @@ -0,0 +1,10 @@ +modifyColumn(TABLE_PREFIX . 'config', 'name', "varchar(255) NOT NULL"); + $db->modifyColumn(TABLE_PREFIX . 'config', 'value', "varchar(10000) NOT NULL"); +}; + +$down = function () { + // nothing to do, to not lose data +};