schema for ban appeals
This commit is contained in:
parent
902da76433
commit
e36cce7903
12
install.php
12
install.php
@ -413,7 +413,7 @@ if (file_exists($config['has_installed'])) {
|
|||||||
query("UPDATE ``mods`` SET `type` = 30 WHERE `type` = 2") or error(db_error());
|
query("UPDATE ``mods`` SET `type` = 30 WHERE `type` = 2") or error(db_error());
|
||||||
query("ALTER TABLE ``mods`` CHANGE `type` `type` smallint(1) NOT NULL") or error(db_error());
|
query("ALTER TABLE ``mods`` CHANGE `type` `type` smallint(1) NOT NULL") or error(db_error());
|
||||||
case 'v0.9.6-dev-20':
|
case 'v0.9.6-dev-20':
|
||||||
query("CREATE TABLE IF NOT EXISTS `bans_new_temp` (
|
__query("CREATE TABLE IF NOT EXISTS `bans_new_temp` (
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`ipstart` varbinary(16) NOT NULL,
|
`ipstart` varbinary(16) NOT NULL,
|
||||||
`ipend` varbinary(16) DEFAULT NULL,
|
`ipend` varbinary(16) DEFAULT NULL,
|
||||||
@ -472,6 +472,16 @@ if (file_exists($config['has_installed'])) {
|
|||||||
query("DROP TABLE ``bans``") or error(db_error());
|
query("DROP TABLE ``bans``") or error(db_error());
|
||||||
// Replace with new table
|
// Replace with new table
|
||||||
query("RENAME TABLE ``bans_new_temp`` TO ``bans``") or error(db_error());
|
query("RENAME TABLE ``bans_new_temp`` TO ``bans``") or error(db_error());
|
||||||
|
case 'v0.9.6-dev-21':
|
||||||
|
__query("CREATE TABLE IF NOT EXISTS ``ban_appeals`` (
|
||||||
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`ban_id` int(10) unsigned NOT NULL,
|
||||||
|
`time` int(10) unsigned NOT NULL,
|
||||||
|
`message` text NOT NULL,
|
||||||
|
`denied` tinyint(1) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `ban_id` (`ban_id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ;") or error(db_error());
|
||||||
case false:
|
case false:
|
||||||
// Update version number
|
// Update version number
|
||||||
file_write($config['has_installed'], VERSION);
|
file_write($config['has_installed'], VERSION);
|
||||||
|
16
install.sql
16
install.sql
@ -268,6 +268,22 @@ CREATE TABLE IF NOT EXISTS `flood` (
|
|||||||
KEY `time` (`time`)
|
KEY `time` (`time`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=ascii COLLATE=ascii_bin AUTO_INCREMENT=1 ;
|
) ENGINE=MyISAM DEFAULT CHARSET=ascii COLLATE=ascii_bin AUTO_INCREMENT=1 ;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `ban_appeals`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `ban_appeals` (
|
||||||
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`ban_id` int(10) unsigned NOT NULL,
|
||||||
|
`time` int(10) unsigned NOT NULL,
|
||||||
|
`message` text NOT NULL,
|
||||||
|
`denied` tinyint(1) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `ban_id` (`ban_id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ;
|
||||||
|
|
||||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
|
Loading…
Reference in New Issue
Block a user