Add 36th migration for settings table

This commit is contained in:
slawkens 2023-05-09 21:53:12 +02:00
parent 40c00a1434
commit 3067b79363
3 changed files with 15 additions and 2 deletions

View File

@ -27,7 +27,7 @@ if (version_compare(phpversion(), '7.2.5', '<')) die('PHP version 7.2.5 or highe
const MYAAC = true;
const MYAAC_VERSION = '0.9.0-dev';
const DATABASE_VERSION = 35;
const DATABASE_VERSION = 36;
const TABLE_PREFIX = 'myaac_';
define('START_TIME', microtime(true));
define('MYAAC_OS', stripos(PHP_OS, 'WIN') === 0 ? 'WINDOWS' : (strtoupper(PHP_OS) === 'DARWIN' ? 'MAC' : 'LINUX'));

View File

@ -1,4 +1,4 @@
SET @myaac_database_version = 35;
SET @myaac_database_version = 36;
CREATE TABLE `myaac_account_actions`
(

View File

@ -1 +1,14 @@
<?php
// add settings table
if(!$db->hasTable(TABLE_PREFIX . 'settings')) {
$db->exec("CREATE TABLE `" . TABLE_PREFIX . "settings`
(
`id` int(11) NOT NULL AUTO_INCREMENT,
`plugin_name` VARCHAR(255) NOT NULL DEFAULT '',
`key` VARCHAR(255) NOT NULL DEFAULT '',
`value` TEXT NOT NULL,
PRIMARY KEY (`id`),
KEY `key` (`key`)
) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8;");
}