fix: Added the new db changes to the SQL files

pull/1150/head
Iglocska 2016-05-20 09:00:04 +02:00
parent 646f444318
commit b9884cf5b8
3 changed files with 32 additions and 2 deletions

View File

@ -30,6 +30,7 @@ CREATE TABLE IF NOT EXISTS `attributes` (
`distribution` tinyint(4) NOT NULL DEFAULT '0',
`sharing_group_id` int(11) NOT NULL,
`comment` text COLLATE utf8_bin NOT NULL,
`deleted` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
INDEX `event_id` (`event_id`),
INDEX `value1` (`value1`(255)),
@ -239,6 +240,21 @@ CREATE TABLE IF NOT EXISTS `logs` (
-- --------------------------------------------------------
--
-- Table structure for table `news`
--
CREATE TABLE IF NOT EXISTS `news` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`message` text COLLATE utf8_bin NOT NULL,
`title` text COLLATE utf8_bin NOT NULL,
`user_id` int(11) NOT NULL,
`date_created` int(11) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `organisations`
--
@ -656,7 +672,7 @@ CREATE TABLE IF NOT EXISTS `users` (
`certif_public` longtext COLLATE utf8_bin DEFAULT NULL,
`nids_sid` int(15) NOT NULL DEFAULT '0',
`termsaccepted` tinyint(1) NOT NULL DEFAULT '0',
`newsread` date DEFAULT NULL,
`newsread` int(11) unsigned DEFAULT '0',
`role_id` int(11) NOT NULL DEFAULT '0',
`change_pw` tinyint(4) NOT NULL DEFAULT '0',
`contactalert` tinyint(1) NOT NULL DEFAULT '0',

View File

@ -27,6 +27,7 @@ end;
delimiter ';'
call AddColumnUnlessExists(Database(), 'attributes', 'sharing_group_id', 'INT( 11 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'attributes', 'deleted', 'TINYINT( 1 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'events', 'sharing_group_id', 'INT( 11 ) NOT NULL DEFAULT 0');
call AddColumnUnlessExists(Database(), 'events', 'org_id', 'INT( 11 ) NOT NULL DEFAULT 0');
@ -159,3 +160,16 @@ CREATE TABLE IF NOT EXISTS `favourite_tags` (
INDEX `tag_id` (`tag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
CREATE TABLE IF NOT EXISTS `news` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`message` text COLLATE utf8_bin NOT NULL,
`title` text COLLATE utf8_bin NOT NULL,
`user_id` int(11) NOT NULL,
`date_created` int(11) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `users` CHANGE `newsread` `newsread` int(11) unsigned;

View File

@ -85,7 +85,7 @@ if (h($user['User']['change_pw']) == 1) {
</dd>
<dt><?php echo __('Newsread'); ?></dt>
<dd>
<?php echo h($user['User']['newsread']); ?>
<?php echo $user['User']['newsread'] ? date('Y/m/d H:i:s', h($user['User']['newsread'])) : 'N/A'; ?>
&nbsp;
</dd>
<dt><?php echo __('Disabled'); ?></dt>