summaryrefslogtreecommitdiff
path: root/modules/irc2sql/tables.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-11-08 13:21:06 +0000
committerSadie Powell <sadie@witchery.services>2024-11-08 13:21:06 +0000
commitb6e4c7302ed45c59f6bb7e28a5281a7dd73be4d0 (patch)
treec97cefdbf7dc67cc87d7cc07711dbf73160229a6 /modules/irc2sql/tables.cpp
parentb7590e20c116313a70e11b3b3eff19670acef479 (diff)
Remove the integer width from chanstats and irc2sql columns.
These are ignored by MySQL so specifying them is meaningless.
Diffstat (limited to 'modules/irc2sql/tables.cpp')
-rw-r--r--modules/irc2sql/tables.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/modules/irc2sql/tables.cpp b/modules/irc2sql/tables.cpp
index 807c7c8cd..dc7f90088 100644
--- a/modules/irc2sql/tables.cpp
+++ b/modules/irc2sql/tables.cpp
@@ -80,14 +80,14 @@ void IRC2SQL::CheckTables()
if (!this->HasTable(prefix + "server"))
{
query = "CREATE TABLE `" + prefix + "server` ("
- "`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,"
+ "`id` int UNSIGNED NOT NULL AUTO_INCREMENT,"
"`name` varchar(64) NOT NULL,"
- "`hops` tinyint(3) NOT NULL,"
+ "`hops` tinyint NOT NULL,"
"`comment` varchar(255) NOT NULL,"
"`link_time` datetime DEFAULT NULL,"
"`split_time` datetime DEFAULT NULL,"
"`version` varchar(127) DEFAULT NULL,"
- "`currentusers` int(15) DEFAULT 0,"
+ "`currentusers` int DEFAULT 0,"
"`online` enum('Y','N') NOT NULL DEFAULT 'Y',"
"`ulined` enum('Y','N') NOT NULL DEFAULT 'N',"
"PRIMARY KEY (`id`),"
@@ -98,7 +98,7 @@ void IRC2SQL::CheckTables()
if (!this->HasTable(prefix + "chan"))
{
query = "CREATE TABLE `" + prefix + "chan` ("
- "`chanid` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,"
+ "`chanid` int UNSIGNED NOT NULL AUTO_INCREMENT,"
"`channel` varchar(255) NOT NULL,"
"`topic` varchar(512) DEFAULT NULL,"
"`topicauthor` varchar(255) DEFAULT NULL,"
@@ -112,7 +112,7 @@ void IRC2SQL::CheckTables()
if (!this->HasTable(prefix + "user"))
{
query = "CREATE TABLE `" + prefix + "user` ("
- "`nickid` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,"
+ "`nickid` int UNSIGNED NOT NULL AUTO_INCREMENT,"
"`nick` varchar(255) NOT NULL DEFAULT '',"
"`host` varchar(255) NOT NULL DEFAULT '',"
"`vhost` varchar(255) NOT NULL DEFAULT '',"
@@ -127,7 +127,7 @@ void IRC2SQL::CheckTables()
"`fingerprint` varchar(128) NOT NULL DEFAULT '',"
"`signon` datetime DEFAULT NULL,"
"`server` varchar(255) NOT NULL DEFAULT '',"
- "`servid` int(11) UNSIGNED NOT NULL DEFAULT '0',"
+ "`servid` int UNSIGNED NOT NULL DEFAULT '0',"
"`uuid` varchar(32) NOT NULL DEFAULT '',"
"`oper` enum('Y','N') NOT NULL DEFAULT 'N',"
"`away` enum('Y','N') NOT NULL DEFAULT 'N',"
@@ -147,8 +147,8 @@ void IRC2SQL::CheckTables()
if (!this->HasTable(prefix + "ison"))
{
query = "CREATE TABLE `" + prefix + "ison` ("
- "`nickid` int(11) unsigned NOT NULL default '0',"
- "`chanid` int(11) unsigned NOT NULL default '0',"
+ "`nickid` int unsigned NOT NULL default '0',"
+ "`chanid` int unsigned NOT NULL default '0',"
"`modes` varchar(255) NOT NULL default '',"
"PRIMARY KEY (`nickid`,`chanid`),"
"KEY `modes` (`modes`)"
@@ -159,7 +159,7 @@ void IRC2SQL::CheckTables()
{
query = "CREATE TABLE `" + prefix + "maxusers` ("
"`name` VARCHAR(255) NOT NULL,"
- "`maxusers` INT(15) NOT NULL,"
+ "`maxusers` int NOT NULL,"
"`maxtime` DATETIME NOT NULL,"
"`lastused` DATETIME NOT NULL,"
"UNIQUE KEY `name` (`name`)"
@@ -200,12 +200,12 @@ void IRC2SQL::CheckTables()
"(nick_ varchar(255), host_ varchar(255), vhost_ varchar(255), "
"chost_ varchar(255), realname_ varchar(255), ip_ varchar(255), "
"ident_ varchar(255), vident_ varchar(255), account_ varchar(255), "
- "secure_ enum('Y','N'), fingerprint_ varchar(255), signon_ int(15), "
+ "secure_ enum('Y','N'), fingerprint_ varchar(255), signon_ int, "
"server_ varchar(255), uuid_ varchar(32), modes_ varchar(255), "
"oper_ enum('Y','N')) "
"BEGIN "
- "DECLARE cur int(15);"
- "DECLARE max int(15);"
+ "DECLARE cur int;"
+ "DECLARE max int;"
"INSERT INTO `" + prefix + "user` "
"(nick, host, vhost, chost, realname, ip, ident, vident, account, "
"secure, fingerprint, signon, server, uuid, modes, oper) "
@@ -304,8 +304,8 @@ void IRC2SQL::CheckTables()
query = "CREATE PROCEDURE `"+ prefix + "JoinUser`"
"(nick_ varchar(255), channel_ varchar(255), modes_ varchar(255)) "
"BEGIN "
- "DECLARE cur int(15);"
- "DECLARE max int(15);"
+ "DECLARE cur int;"
+ "DECLARE max int;"
"INSERT INTO `" + prefix + "ison` (nickid, chanid, modes) "
"SELECT u.nickid, c.chanid, modes_ "
"FROM " + prefix + "user AS u, " + prefix + "chan AS c "