Update sessions table columns for consistency (#2299)
* Update sessions table columns for consistency Fix #2276 This update changes two columns in the sessions table to match the column declartations in the users table. * Update servatrice.sql Update servatrice.sql to reflect new db schema version
This commit is contained in:
parent
c78eed576f
commit
c9a8dafd01
3 changed files with 10 additions and 4 deletions
6
servatrice/migrations/servatrice_0018_to_0019.sql
Normal file
6
servatrice/migrations/servatrice_0018_to_0019.sql
Normal file
|
@ -0,0 +1,6 @@
|
|||
-- Servatrice db migration from version 18 to version 19
|
||||
|
||||
alter table cockatrice_sessions modify column `user_name` varchar(35) NOT NULL;
|
||||
alter table cockatrice_sessions modify column `ip_address` varchar(255) NOT NULL;
|
||||
|
||||
UPDATE cockatrice_schema_version SET version=19 WHERE version=18;
|
|
@ -20,7 +20,7 @@ CREATE TABLE IF NOT EXISTS `cockatrice_schema_version` (
|
|||
PRIMARY KEY (`version`)
|
||||
) ENGINE=INNODB DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO cockatrice_schema_version VALUES(18);
|
||||
INSERT INTO cockatrice_schema_version VALUES(19);
|
||||
|
||||
-- users and user data tables
|
||||
CREATE TABLE IF NOT EXISTS `cockatrice_users` (
|
||||
|
@ -176,9 +176,9 @@ CREATE TABLE IF NOT EXISTS `cockatrice_servermessages` (
|
|||
|
||||
CREATE TABLE IF NOT EXISTS `cockatrice_sessions` (
|
||||
`id` int(9) NOT NULL AUTO_INCREMENT,
|
||||
`user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`user_name` varchar(35) NOT NULL,
|
||||
`id_server` tinyint(3) NOT NULL,
|
||||
`ip_address` char(15) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`ip_address` varchar(255) NOT NULL,
|
||||
`start_time` datetime NOT NULL,
|
||||
`end_time` datetime DEFAULT NULL,
|
||||
`clientid` varchar(15) NOT NULL,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "server.h"
|
||||
#include "server_database_interface.h"
|
||||
|
||||
#define DATABASE_SCHEMA_VERSION 18
|
||||
#define DATABASE_SCHEMA_VERSION 19
|
||||
|
||||
class Servatrice;
|
||||
|
||||
|
|
Loading…
Reference in a new issue