* removed name field from screenshots table

* updated db to version 7
This commit is contained in:
slawkens 2017-08-28 17:18:47 +02:00
parent eecdcfbabe
commit 430351aee3
3 changed files with 6 additions and 3 deletions

View File

@ -28,7 +28,7 @@ session_start();
define('MYAAC', true); define('MYAAC', true);
define('MYAAC_VERSION', '0.2.4'); define('MYAAC_VERSION', '0.2.4');
define('DATABASE_VERSION', 6); define('DATABASE_VERSION', 7);
define('TABLE_PREFIX', 'myaac_'); define('TABLE_PREFIX', 'myaac_');
define('START_TIME', microtime(true)); define('START_TIME', microtime(true));
define('MYAAC_OS', (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? 'WINDOWS' : (strtoupper(PHP_OS) == 'DARWIN' ? 'MAC' : 'LINUX')); define('MYAAC_OS', (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? 'WINDOWS' : (strtoupper(PHP_OS) == 'DARWIN' ? 'MAC' : 'LINUX'));

View File

@ -205,7 +205,6 @@ CREATE TABLE `myaac_pages`
CREATE TABLE `myaac_screenshots` CREATE TABLE `myaac_screenshots`
( (
`id` INT(11) NOT NULL AUTO_INCREMENT, `id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(30) NOT NULL,
`comment` VARCHAR(255) NOT NULL DEFAULT '', `comment` VARCHAR(255) NOT NULL DEFAULT '',
`image` VARCHAR(255) NOT NULL, `image` VARCHAR(255) NOT NULL,
`thumb` VARCHAR(255) NOT NULL, `thumb` VARCHAR(255) NOT NULL,
@ -215,7 +214,7 @@ CREATE TABLE `myaac_screenshots`
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE = MyISAM; ) 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` CREATE TABLE `myaac_spells`
( (

4
system/migrations/7.php Normal file
View File

@ -0,0 +1,4 @@
<?php
if(fieldExist('name', TABLE_PREFIX . 'screenshots'))
$db->query("ALTER TABLE `" . TABLE_PREFIX . "screenshots` DROP `name`;");
?>