Skip to content

Commit

Permalink
V1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hhunderter committed May 29, 2019
1 parent abe38af commit 53851e8
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Config extends \Ilch\Config\Install
{
public $config = [
'key' => 'radiohoerercharts',
'version' => '1.3.1',
'version' => '1.3.2',
'icon_small' => 'fa-list-ol',
'author' => 'Reilard, Dennis alias hhunderter ',
'link' => '',
Expand Down Expand Up @@ -76,7 +76,7 @@ public function getInstallSql()
`interpret` VARCHAR(255) NOT NULL,
`songtitel` VARCHAR(255) NOT NULL,
`votes` INT UNSIGNED NOT NULL,
`datecreate` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`datecreate` DATETIME NOT NULL,
`user_id` INT(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;
Expand All @@ -93,7 +93,7 @@ public function getInstallSql()
`id` INT(11) NOT NULL AUTO_INCREMENT,
`interpret` VARCHAR(255) NOT NULL,
`songtitel` VARCHAR(255) NOT NULL,
`datecreate` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`datecreate` DATETIME NOT NULL,
`user_id` INT(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;';
Expand Down Expand Up @@ -147,13 +147,15 @@ public function getUpdate($installedVersion)
*/
$this->db()->query('ALTER TABLE `[prefix]_radio_hoerercharts_uservotes` ADD COLUMN `last_activity` DATETIME NOT NULL AFTER `session_id`;');
$this->db()->query('ALTER TABLE `[prefix]_radio_hoerercharts` ADD COLUMN `setfree` TINYINT(1) NOT NULL DEFAULT \'1\' AFTER `id`;');
$this->db()->query('ALTER TABLE `[prefix]_radio_hoerercharts` ADD COLUMN `datecreate` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `votes`;');
$this->db()->query('ALTER TABLE `[prefix]_radio_hoerercharts` ADD COLUMN `datecreate` DATETIME NOT NULL AFTER `votes`;');
$datecreate = new \Ilch\Date();
$this->db()->query('UPDATE `[prefix]_radio_hoerercharts` SET `datecreate` = "'.$datecreate.'"');
$this->db()->query('ALTER TABLE `[prefix]_radio_hoerercharts` ADD COLUMN `user_id` INT(11) NOT NULL AFTER `datecreate`;');
$this->db()->query('CREATE TABLE IF NOT EXISTS `[prefix]_radio_hoerercharts_suggestion` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`interpret` VARCHAR(255) NOT NULL,
`songtitel` VARCHAR(255) NOT NULL,
`datecreate` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`datecreate` DATETIME NOT NULL,
`user_id` INT(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1;');
Expand All @@ -163,8 +165,14 @@ public function getUpdate($installedVersion)
case "1.3.0": //update zu 1.3.1
/*
fix indentation
bugfix
bugfix of redirect in Frontent
*/
case "1.3.1": //update zu 1.3.2
/*
bugfix of DEFAULT value datecreate CURRENT_TIMESTAMP / now()
*/
$this->db()->query('ALTER TABLE `[prefix]_radio_hoerercharts_suggestion` CHANGE `datecreate` `datecreate` DATETIME NOT NULL;');
$this->db()->query('ALTER TABLE `[prefix]_radio_hoerercharts` CHANGE `datecreate` `datecreate` DATETIME NOT NULL;');
}
return 'Update function executed.';
}
Expand Down

0 comments on commit 53851e8

Please sign in to comment.