Rename database column SOURCE to ADDON_ID.
Also rename VERSION to ADDON_VERSION.
This commit is contained in:
parent
2dcd217a6a
commit
80b26dbb43
4 changed files with 9 additions and 9 deletions
|
@ -470,10 +470,10 @@ void fuh::db_insert_game_player_info(const std::string& uuid, int game_id, const
|
|||
}
|
||||
}
|
||||
|
||||
void fuh::db_insert_content_info(const std::string& uuid, int game_id, const std::string& type, const std::string& id, const std::string& source, const std::string& version){
|
||||
void fuh::db_insert_content_info(const std::string& uuid, int game_id, const std::string& type, const std::string& id, const std::string& addon_id, const std::string& addon_version){
|
||||
try {
|
||||
prepared_statement<void>("insert into `" + db_game_content_info_table_ + "`(INSTANCE_UUID, GAME_ID, TYPE, ID, SOURCE, VERSION) values(?, ?, ?, ?, ?, ?)",
|
||||
uuid, game_id, type, id, source, version);
|
||||
prepared_statement<void>("insert into `" + db_game_content_info_table_ + "`(INSTANCE_UUID, GAME_ID, TYPE, ID, ADDON_ID, ADDON_VERSION) values(?, ?, ?, ?, ?, ?)",
|
||||
uuid, game_id, type, id, addon_id, addon_version);
|
||||
} catch (const sql_error& e) {
|
||||
ERR_UH << "Could not insert the game's content information on table `" + db_game_content_info_table_ + "`:" << e.message << std::endl;
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ class fuh : public user_handler {
|
|||
void db_insert_game_info(const std::string& uuid, int game_id, const std::string& version, const std::string& name, int reload, int observers, int is_public, int has_password);
|
||||
void db_update_game_end(const std::string& uuid, int game_id, const std::string& replay_location);
|
||||
void db_insert_game_player_info(const std::string& uuid, int game_id, const std::string& username, int side_number, int is_host, const std::string& faction, const std::string& version, const std::string& source, const std::string& current_user);
|
||||
void db_insert_content_info(const std::string& uuid, int game_id, const std::string& type, const std::string& id, const std::string& source, const std::string& version);
|
||||
void db_insert_content_info(const std::string& uuid, int game_id, const std::string& type, const std::string& id, const std::string& addon_id, const std::string& addon_version);
|
||||
void db_set_oos_flag(const std::string& uuid, int game_id);
|
||||
|
||||
private:
|
||||
|
|
|
@ -175,7 +175,7 @@ class user_handler {
|
|||
virtual void db_insert_game_info(const std::string& uuid, int game_id, const std::string& version, const std::string& name, int reload, int observers, int is_public, int has_password) =0;
|
||||
virtual void db_update_game_end(const std::string& uuid, int game_id, const std::string& replay_location) =0;
|
||||
virtual void db_insert_game_player_info(const std::string& uuid, int game_id, const std::string& username, int side_number, int is_host, const std::string& faction, const std::string& version, const std::string& source, const std::string& current_user) =0;
|
||||
virtual void db_insert_content_info(const std::string& uuid, int game_id, const std::string& type, const std::string& id, const std::string& source, const std::string& version) =0;
|
||||
virtual void db_insert_content_info(const std::string& uuid, int game_id, const std::string& type, const std::string& id, const std::string& addon_id, const std::string& addon_version) =0;
|
||||
virtual void db_set_oos_flag(const std::string& uuid, int game_id) =0;
|
||||
|
||||
protected:
|
||||
|
|
|
@ -101,15 +101,15 @@ create table game_player_info
|
|||
-- information about the scenario/era/modifications for the game
|
||||
-- TYPE: one of era/scenario/modification
|
||||
-- ID: the id of the content
|
||||
-- SOURCE: the id of the add-on that the particular content came from
|
||||
-- VERSION: the version of the source add-on
|
||||
-- ADDON_ID: the id of the add-on that the particular content came from
|
||||
-- ADDON_VERSION: the version of the source add-on
|
||||
create table game_content_info
|
||||
(
|
||||
INSTANCE_UUID CHAR(36) NOT NULL,
|
||||
GAME_ID INT UNSIGNED NOT NULL,
|
||||
TYPE VARCHAR(255) NOT NULL,
|
||||
ID VARCHAR(255) NOT NULL,
|
||||
SOURCE VARCHAR(255) NOT NULL,
|
||||
VERSION VARCHAR(255) NOT NULL,
|
||||
ADDON_ID VARCHAR(255) NOT NULL,
|
||||
ADDON_VERSION VARCHAR(255) NOT NULL,
|
||||
PRIMARY KEY (INSTANCE_UUID, GAME_ID, TYPE, ID)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
|
Loading…
Add table
Reference in a new issue