From 430351aee36a9dc7888ac343a2c0665f15e27c01 Mon Sep 17 00:00:00 2001 From: slawkens Date: Mon, 28 Aug 2017 17:18:47 +0200 Subject: [PATCH] * removed name field from screenshots table * updated db to version 7 --- common.php | 2 +- install/includes/schema.sql | 3 +-- system/migrations/7.php | 4 ++++ 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 system/migrations/7.php diff --git a/common.php b/common.php index 1a3104a4..dd3d9baa 100644 --- a/common.php +++ b/common.php @@ -28,7 +28,7 @@ session_start(); define('MYAAC', true); define('MYAAC_VERSION', '0.2.4'); -define('DATABASE_VERSION', 6); +define('DATABASE_VERSION', 7); define('TABLE_PREFIX', 'myaac_'); define('START_TIME', microtime(true)); define('MYAAC_OS', (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? 'WINDOWS' : (strtoupper(PHP_OS) == 'DARWIN' ? 'MAC' : 'LINUX')); diff --git a/install/includes/schema.sql b/install/includes/schema.sql index 95d6efa3..acb08f6d 100644 --- a/install/includes/schema.sql +++ b/install/includes/schema.sql @@ -205,7 +205,6 @@ CREATE TABLE `myaac_pages` CREATE TABLE `myaac_screenshots` ( `id` INT(11) NOT NULL AUTO_INCREMENT, - `name` VARCHAR(30) NOT NULL, `comment` VARCHAR(255) NOT NULL DEFAULT '', `image` VARCHAR(255) NOT NULL, `thumb` VARCHAR(255) NOT NULL, @@ -215,7 +214,7 @@ CREATE TABLE `myaac_screenshots` PRIMARY KEY (`id`) ) ENGINE = MyISAM; -INSERT INTO `myaac_screenshots` (`id`, `ordering`, `name`, `comment`, `image`, `thumb`, `author`) VALUES (NULL, 1, 'Demon', 'Demon', 'images/screenshots/demon.jpg', 'images/screenshots/demon_thumb.gif', 'MyAAC'); +INSERT INTO `myaac_screenshots` (`id`, `ordering`, `comment`, `image`, `thumb`, `author`) VALUES (NULL, 1, 'Demon', 'images/screenshots/demon.jpg', 'images/screenshots/demon_thumb.gif', 'MyAAC'); CREATE TABLE `myaac_spells` ( diff --git a/system/migrations/7.php b/system/migrations/7.php new file mode 100644 index 00000000..da254717 --- /dev/null +++ b/system/migrations/7.php @@ -0,0 +1,4 @@ +query("ALTER TABLE `" . TABLE_PREFIX . "screenshots` DROP `name`;"); +?> \ No newline at end of file