Merge pull request #2101 from woogerboy21/remove_news_table

Remove news table (cleanup)
This commit is contained in:
woogerboy21 2016-07-21 23:29:53 -04:00 committed by GitHub
commit 569ae87cbe
5 changed files with 7 additions and 15 deletions

View file

@ -0,0 +1,5 @@
-- Servatrice db migration from version 15 to version 16
drop table cockatrice_news;
UPDATE cockatrice_schema_version SET version=16 WHERE version=15;

View file

@ -25,7 +25,6 @@ TABLES=(
"cockatrice_schema_version"
"cockatrice_servermessages"
"cockatrice_servers"
"cockatrice_news"
"cockatrice_rooms"
"cockatrice_rooms_gametypes"
)

View file

@ -25,7 +25,6 @@ TABLES=(
"cockatrice_schema_version"
"cockatrice_servermessages"
"cockatrice_servers"
"cockatrice_news"
"cockatrice_rooms"
"cockatrice_rooms_gametypes"
)

View file

@ -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(15);
INSERT INTO cockatrice_schema_version VALUES(16);
-- users and user data tables
CREATE TABLE IF NOT EXISTS `cockatrice_users` (
@ -142,17 +142,6 @@ CREATE TABLE IF NOT EXISTS `cockatrice_replays_access` (
-- server administration
-- Note: unused table
CREATE TABLE IF NOT EXISTS `cockatrice_news` (
`id` int(7) unsigned zerofill NOT NULL auto_increment,
`id_user` int(7) unsigned zerofill NOT NULL,
`news_date` datetime NOT NULL,
`subject` varchar(255) NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY(`id_user`) REFERENCES `cockatrice_users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=INNODB DEFAULT CHARSET=utf8;
-- Note: unused table
CREATE TABLE IF NOT EXISTS `cockatrice_servers` (
`id` mediumint(8) unsigned NOT NULL,

View file

@ -9,7 +9,7 @@
#include "server.h"
#include "server_database_interface.h"
#define DATABASE_SCHEMA_VERSION 15
#define DATABASE_SCHEMA_VERSION 16
class Servatrice;