MySQL Forums
Forum List  »  InnoDB

can someone make this to .sql file ?
Posted by: jinkwang kim
Date: March 10, 2018 04:33AM

SQL_TVoid(g_dDatabase, "CREATE TABLE IF NOT EXISTS `store_players` (\
`id` int(11) NOT NULL AUTO_INCREMENT,\
`authid` varchar(32) NOT NULL,\
`name` varchar(64) NOT NULL,\
`credits` int(11) NOT NULL,\
`date_of_join` int(11) NOT NULL,\
`date_of_last_join` int(11) NOT NULL,\
PRIMARY KEY (`id`),\
UNIQUE KEY `id` (`id`),\
UNIQUE KEY `authid` (`authid`)\
) ENGINE=InnoDB CHARSET=utf8mb4;");
SQL_TVoid(g_dDatabase, "CREATE TABLE IF NOT EXISTS `store_items` (\
`id` int(11) NOT NULL AUTO_INCREMENT,\
`player_id` int(11) NOT NULL,\
`type` varchar(16) NOT NULL,\
`unique_id` varchar(256) NOT NULL,\
`date_of_purchase` int(11) NOT NULL,\
`date_of_expiration` int(11) NOT NULL,\
PRIMARY KEY (`id`)\
) ENGINE=InnoDB CHARSET=utf8mb4;");
SQL_TVoid(g_dDatabase, "CREATE TABLE IF NOT EXISTS `store_equipment` (\
`player_id` int(11) NOT NULL,\
`type` varchar(16) NOT NULL,\
`unique_id` varchar(256) NOT NULL,\
`slot` int(11) NOT NULL\
) ENGINE=InnoDB CHARSET=utf8mb4;");
SQL_TVoid(g_dDatabase, "CREATE TABLE IF NOT EXISTS `store_logs` (\
`id` int(11) NOT NULL AUTO_INCREMENT,\
`player_id` int(11) NOT NULL,\
`credits` int(11) NOT NULL,\
`reason` varchar(256) NOT NULL,\
`date` int(11) NOT NULL,\
PRIMARY KEY (`id`)\
) ENGINE=InnoDB CHARSET=utf8mb4;");
g_dDatabase.Query(SQLCallback_NoError, "ALTER TABLE store_items ADD COLUMN price_of_purchase int(11)");
char m_szQuery[512];
Format(m_szQuery, sizeof(m_szQuery), "CREATE TABLE IF NOT EXISTS `%s` (\
`id` int(11) NOT NULL AUTO_INCREMENT,\
`parent_id` int(11) NOT NULL DEFAULT '-1',\
`item_price` int(32) NOT NULL,\
`item_type` varchar(64) NOT NULL,\
`item_flag` varchar(64) NOT NULL,\
`item_name` varchar(64) NOT NULL,\
`additional_info` text NOT NULL,\
`item_status` tinyint(1) NOT NULL,\
`supported_game` varchar(64) NOT NULL,\
PRIMARY KEY (`id`)\
) ENGINE=InnoDB CHARSET=utf8mb4;", g_eCvars[g_cvarItemsTable][sCache]);
SQL_TVoid(g_dDatabase, m_szQuery);

Options: ReplyQuote


Subject
Views
Written By
Posted
can someone make this to .sql file ?
68
March 10, 2018 04:33AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.