diff --git a/common.php b/common.php index c63f4494..0969ac06 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 = '1.0-RC.2'; -const DATABASE_VERSION = 41; +const DATABASE_VERSION = 42; 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 1c8f4ccc..91853e07 100644 --- a/install/includes/schema.sql +++ b/install/includes/schema.sql @@ -1,4 +1,4 @@ -SET @myaac_database_version = 41; +SET @myaac_database_version = 42; CREATE TABLE `myaac_account_actions` ( @@ -91,7 +91,7 @@ CREATE TABLE `myaac_forum` `post_date` int(20) NOT NULL default '0', `last_edit_aid` int(20) NOT NULL default '0', `edit_date` int(20) NOT NULL default '0', - `post_ip` varchar(32) NOT NULL default '0.0.0.0', + `post_ip` varchar(45) NOT NULL default '0.0.0.0', `sticked` tinyint(1) NOT NULL DEFAULT '0', `closed` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), diff --git a/system/migrations/42.php b/system/migrations/42.php new file mode 100644 index 00000000..92408a59 --- /dev/null +++ b/system/migrations/42.php @@ -0,0 +1,15 @@ +modifyColumn(TABLE_PREFIX . 'forum', 'post_ip', "varchar(45) NOT NULL default '0.0.0.0'"); +}; + +$down = function () { + // there is no downgrade for this +}; +