Open maximozz opened 9 years ago
named custom table 'mozz_gentransactions' make .sql file
1) copied structure from 'mozz_genpackages' table; 2) edited, dropped and added relevant fields and indexes, f.e. ALTER TABLE mozz_gentransactions DROP price, DROP currency ; ALTER TABLE mozz_gentransactions CHANGE type type ENUM( 'FOC', 'DAR', 'EUR' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ; etc. 3) result - table structure CREATE TABLE IF NOT EXISTS mozz_gentransactions ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, type enum('FOC','DAR','EUR') NOT NULL, subtype int(11) DEFAULT NULL, buyer_id bigint(20) unsigned NOT NULL, seller_id bigint(20) unsigned NOT NULL, container_id bigint(20) unsigned NOT NULL, generator_id bigint(20) unsigned NOT NULL, time_purchased int(11) NOT NULL, enabled enum('yes','no') NOT NULL DEFAULT 'yes', PRIMARY KEY (id), KEY type (type), KEY subtype (subtype), KEY container_guid (container_id), KEY time_created (time_purchased), KEY buyer_guid (buyer_id), KEY seller_guid (seller_id), KEY generator_guid (generator_id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
mozz_gentransactions
price
currency
type
id
subtype
buyer_id
seller_id
container_id
generator_id
time_purchased
enabled
container_guid
time_created
buyer_guid
seller_guid
generator_guid
named custom table 'mozz_gentransactions' make .sql file
1) copied structure from 'mozz_genpackages' table; 2) edited, dropped and added relevant fields and indexes, f.e. ALTER TABLE
mozz_gentransactions
DROPprice
, DROPcurrency
; ALTER TABLEmozz_gentransactions
CHANGEtype
type
ENUM( 'FOC', 'DAR', 'EUR' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ; etc. 3) result - table structure CREATE TABLE IF NOT EXISTSmozz_gentransactions
(id
bigint(20) unsigned NOT NULL AUTO_INCREMENT,type
enum('FOC','DAR','EUR') NOT NULL,subtype
int(11) DEFAULT NULL,buyer_id
bigint(20) unsigned NOT NULL,seller_id
bigint(20) unsigned NOT NULL,container_id
bigint(20) unsigned NOT NULL,generator_id
bigint(20) unsigned NOT NULL,time_purchased
int(11) NOT NULL,enabled
enum('yes','no') NOT NULL DEFAULT 'yes', PRIMARY KEY (id
), KEYtype
(type
), KEYsubtype
(subtype
), KEYcontainer_guid
(container_id
), KEYtime_created
(time_purchased
), KEYbuyer_guid
(buyer_id
), KEYseller_guid
(seller_id
), KEYgenerator_guid
(generator_id
) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;