Skip to content

Commit

Permalink
Fix for feature #681. Staticpage tables on new install would be missi…
Browse files Browse the repository at this point in the history
…ng new columns
  • Loading branch information
eSilverStrike committed Oct 27, 2016
1 parent a8f36b7 commit eb33d70
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions plugins/staticpages/sql/mysql_install.php
Expand Up @@ -46,6 +46,8 @@
modified datetime default NULL,
sp_format varchar(20) NOT NULL default '',
sp_onmenu tinyint(1) unsigned NOT NULL default '0',
sp_onhits tinyint(1) unsigned NOT NULL default '1',
sp_onlastupdate tinyint(1) unsigned NOT NULL default '1',
sp_label varchar(64) default NULL,
commentcode tinyint(4) NOT NULL default '0',
meta_description TEXT NULL,
Expand Down
3 changes: 2 additions & 1 deletion plugins/staticpages/sql/mysql_updates.php
Expand Up @@ -76,7 +76,8 @@
'1.6.7' => array(
"ALTER TABLE {$_TABLES['staticpage']} MODIFY COLUMN `created` DATETIME DEFAULT NULL",
"ALTER TABLE {$_TABLES['staticpage']} MODIFY COLUMN `modified` DATETIME DEFAULT NULL",
"ALTER TABLE {$_TABLES['staticpage']} ADD `sp_onhits` TINYINT NOT NULL DEFAULT '1' AFTER `sp_onmenu`, ADD `sp_onlastupdate` TINYINT NOT NULL DEFAULT '1' AFTER `sp_onhits`"
"ALTER TABLE {$_TABLES['staticpage']} ADD `sp_onhits` TINYINT NOT NULL DEFAULT '1' AFTER `sp_onmenu`",
"ALTER TABLE {$_TABLES['staticpage']} ADD `sp_onlastupdate` TINYINT NOT NULL DEFAULT '1' AFTER `sp_onhits`"
)
);

Expand Down
2 changes: 2 additions & 0 deletions plugins/staticpages/sql/pgsql_install.php
Expand Up @@ -44,6 +44,8 @@
modified timestamp NOT NULL default NULL,
sp_format varchar(20) NOT NULL default '',
sp_onmenu int NOT NULL default '0',
sp_onhits int NOT NULL default '1',
sp_onlastupdate int NOT NULL default '1',
sp_label varchar(64) default NULL,
commentcode int NOT NULL default '0',
meta_description TEXT NULL,
Expand Down
3 changes: 2 additions & 1 deletion plugins/staticpages/sql/pgsql_updates.php
Expand Up @@ -53,7 +53,8 @@
),

'1.6.7' => array(
"ALTER TABLE {$_TABLES['staticpage']} ADD `sp_onhits` TINYINT NOT NULL DEFAULT '1' AFTER `sp_onmenu`, ADD `sp_onlastupdate` TINYINT NOT NULL DEFAULT '1' AFTER `sp_onhits`"
"ALTER TABLE {$_TABLES['staticpage']} ADD `sp_onhits` TINYINT NOT NULL DEFAULT '1' AFTER `sp_onmenu`",
"ALTER TABLE {$_TABLES['staticpage']} ADD `sp_onlastupdate` TINYINT NOT NULL DEFAULT '1' AFTER `sp_onhits`"
)
);

Expand Down

0 comments on commit eb33d70

Please sign in to comment.