From d683fce2b9cd0b5340745c2edb0f53f6e869afe5 Mon Sep 17 00:00:00 2001 From: slawkens Date: Sat, 4 Jun 2022 21:43:37 +0200 Subject: [PATCH] Fix #171 --- common.php | 2 +- install/includes/schema.sql | 4 ++-- system/migrations/33.php | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 system/migrations/33.php diff --git a/common.php b/common.php index 9d16d4bf..9386f2c4 100644 --- a/common.php +++ b/common.php @@ -27,7 +27,7 @@ if (version_compare(phpversion(), '5.6', '<')) die('PHP version 5.6 or higher is define('MYAAC', true); define('MYAAC_VERSION', '0.8.6'); -define('DATABASE_VERSION', 32); +define('DATABASE_VERSION', 33); define('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 96e5216c..fc86b4bf 100644 --- a/install/includes/schema.sql +++ b/install/includes/schema.sql @@ -1,4 +1,4 @@ -SET @myaac_database_version = 32; +SET @myaac_database_version = 33; CREATE TABLE `myaac_account_actions` ( @@ -324,7 +324,7 @@ CREATE TABLE `myaac_spells` CREATE TABLE `myaac_visitors` ( - `ip` VARCHAR(16) NOT NULL, + `ip` VARCHAR(45) NOT NULL, `lastvisit` INT(11) NOT NULL DEFAULT 0, `page` VARCHAR(2048) NOT NULL, UNIQUE (`ip`) diff --git a/system/migrations/33.php b/system/migrations/33.php new file mode 100644 index 00000000..12fe4c2c --- /dev/null +++ b/system/migrations/33.php @@ -0,0 +1,6 @@ +exec('ALTER TABLE `' . TABLE_PREFIX . "visitors` MODIFY `ip` VARCHAR(45) NOT NULL;");