Browse Source

SQL: update for accounts table, as required by [L1557]. Additionally, some numeric types are trimmed for performance. Upcoming changes in the DB naming and field type should require attention as well; you have been warned ;P

DrLecter 17 years ago
parent
commit
30f07f4d49

+ 3 - 3
datapack_development/sql/accounts.sql

@@ -5,8 +5,8 @@ CREATE TABLE IF NOT EXISTS `accounts` (
   `login` VARCHAR(45) NOT NULL default '',
   `password` VARCHAR(45) ,
   `lastactive` DECIMAL(20),
-  `access_level` INT,
-  `lastIP` VARCHAR(20),
-  `lastServer` int(4) default 1,
+  `accessLevel` TINYINT NOT NULL DEFAULT 0,
+  `lastIP` CHAR(15) NULL DEFAULT NULL,
+  `lastServer` TINYINT DEFAULT 1,
   PRIMARY KEY (`login`)
 );

+ 4 - 0
datapack_development/sql/updates/20080117update.sql

@@ -0,0 +1,4 @@
+ALTER TABLE `accounts` 
+CHANGE `access_level` `accessLevel` TINYINT NOT NULL DEFAULT 0 ,
+CHANGE `lastIP` `lastIP` CHAR( 15 ) NULL DEFAULT NULL ,
+CHANGE `lastServer` `lastServer` TINYINT UNSIGNED NULL DEFAULT '1'