MySQL Forums
Forum List  »  Newbie

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

2145 SQL_TVoid(g_dDatabase, "CREATE TABLE IF NOT EXISTS `store_players` (\
2146 `id` int(11) NOT NULL AUTO_INCREMENT,\
2147 `authid` varchar(32) NOT NULL,\
2148 `name` varchar(64) NOT NULL,\
2149 `credits` int(11) NOT NULL,\
2150 `date_of_join` int(11) NOT NULL,\
2151 `date_of_last_join` int(11) NOT NULL,\
2152 PRIMARY KEY (`id`),\
2153 UNIQUE KEY `id` (`id`),\
2154 UNIQUE KEY `authid` (`authid`)\
2155 ) ENGINE=InnoDB CHARSET=utf8mb4;");
2156 SQL_TVoid(g_dDatabase, "CREATE TABLE IF NOT EXISTS `store_items` (\
2157 `id` int(11) NOT NULL AUTO_INCREMENT,\
2158 `player_id` int(11) NOT NULL,\
2159 `type` varchar(16) NOT NULL,\
2160 `unique_id` varchar(256) NOT NULL,\
2161 `date_of_purchase` int(11) NOT NULL,\
2162 `date_of_expiration` int(11) NOT NULL,\
2163 PRIMARY KEY (`id`)\
2164 ) ENGINE=InnoDB CHARSET=utf8mb4;");
2165 SQL_TVoid(g_dDatabase, "CREATE TABLE IF NOT EXISTS `store_equipment` (\
2166 `player_id` int(11) NOT NULL,\
2167 `type` varchar(16) NOT NULL,\
2168 `unique_id` varchar(256) NOT NULL,\
2169 `slot` int(11) NOT NULL\
2170 ) ENGINE=InnoDB CHARSET=utf8mb4;");
2171 SQL_TVoid(g_dDatabase, "CREATE TABLE IF NOT EXISTS `store_logs` (\
2172 `id` int(11) NOT NULL AUTO_INCREMENT,\
2173 `player_id` int(11) NOT NULL,\
2174 `credits` int(11) NOT NULL,\
2175 `reason` varchar(256) NOT NULL,\
2176 `date` int(11) NOT NULL,\
2177 PRIMARY KEY (`id`)\
2178 ) ENGINE=InnoDB CHARSET=utf8mb4;");
2179 g_dDatabase.Query(SQLCallback_NoError, "ALTER TABLE store_items ADD COLUMN price_of_purchase int(11)");
2180 char m_szQuery[512];
2181 Format(m_szQuery, sizeof(m_szQuery), "CREATE TABLE IF NOT EXISTS `%s` (\
2182 `id` int(11) NOT NULL AUTO_INCREMENT,\
2183 `parent_id` int(11) NOT NULL DEFAULT '-1',\
2184 `item_price` int(32) NOT NULL,\
2185 `item_type` varchar(64) NOT NULL,\
2186 `item_flag` varchar(64) NOT NULL,\
2187 `item_name` varchar(64) NOT NULL,\
2188 `additional_info` text NOT NULL,\
2189 `item_status` tinyint(1) NOT NULL,\
2190 `supported_game` varchar(64) NOT NULL,\
2191 PRIMARY KEY (`id`)\
2192 ) ENGINE=InnoDB CHARSET=utf8mb4;", g_eCvars[g_cvarItemsTable][sCache]);
2193 SQL_TVoid(g_dDatabase, m_szQuery);

Options: ReplyQuote


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


Sorry, you can't reply to this topic. It has been closed.

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.