Compatibility with old z_ gesior table. This fixes #46

This commit is contained in:
tobi132
2019-10-17 23:42:02 +02:00
parent 798d0948d1
commit 645e7ee95f
11 changed files with 73 additions and 34 deletions

View File

@@ -214,3 +214,23 @@ if($db->hasColumn('players', 'rank_id')) {
}
}
}
if($db->hasTable('z_forum')) {
if(!$db->hasColumn('z_forum', 'post_html')) {
if(query("ALTER TABLE `z_forum` ADD `post_html` tinyint(1) NOT NULL DEFAULT '0' AFTER `post_smile`;")) {
success($locale['step_database_adding_field'] . ' z_forum.post_html...');
}
}
if(!$db->hasColumn('z_forum', 'sticked')) {
if(query("ALTER TABLE `z_forum` ADD `sticked` tinyint(1) NOT NULL DEFAULT '0';")) {
success($locale['step_database_adding_field'] . ' z_forum.sticked...');
}
}
if(!$db->hasColumn('z_forum', 'closed')) {
if(query("ALTER TABLE `z_forum` ADD `closed` tinyint(1) NOT NULL DEFAULT '0';")) {
success($locale['step_database_adding_field'] . ' z_forum.closed...');
}
}
}