maximozz / solidaria

0 stars 0 forks source link

Create DB table for generators #2

Open maximozz opened 9 years ago

maximozz commented 9 years ago

named custom table 'mozz_generators' make .sql file

1) copied from 'elgg_entities' table CREATE TABLE solidaria_one.mozz_generators ( guid bigint( 20 ) unsigned NOT NULL AUTO_INCREMENT , type enum( 'object', 'user', 'group', 'site' ) NOT NULL , subtype int( 11 ) DEFAULT NULL , owner_guid bigint( 20 ) unsigned NOT NULL , site_guid bigint( 20 ) unsigned NOT NULL , container_guid bigint( 20 ) unsigned NOT NULL , access_id int( 11 ) NOT NULL , time_created int( 11 ) NOT NULL , time_updated int( 11 ) NOT NULL , last_action int( 11 ) NOT NULL DEFAULT '0', enabled enum( 'yes', 'no' ) NOT NULL DEFAULT 'yes', PRIMARY KEY ( guid ) , KEY type ( type ) , KEY subtype ( subtype ) , KEY owner_guid ( owner_guid ) , KEY site_guid ( site_guid ) , KEY container_guid ( container_guid ) , KEY access_id ( access_id ) , KEY time_created ( time_created ) , KEY time_updated ( time_updated ) ) ENGINE = MYISAM DEFAULT CHARSET = utf8;

2) modified as following CREATE TABLE IF NOT EXISTS mozz_generators ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, type enum('ini','std','biz') NOT NULL, subtype int(11) DEFAULT NULL, owner_id bigint(20) unsigned NOT NULL, site_id bigint(20) unsigned NOT NULL, container_id bigint(20) unsigned NOT NULL, access_id int(11) NOT NULL, time_created int(11) NOT NULL, time_updated int(11) NOT NULL, last_action int(11) NOT NULL DEFAULT '0', dars_generated decimal(7,0) NOT NULL DEFAULT '0', enabled enum('yes','no') NOT NULL DEFAULT 'yes', PRIMARY KEY (id), KEY type (type), KEY subtype (subtype), KEY owner_guid (owner_id), KEY site_guid (site_id), KEY container_guid (container_id), KEY access_id (access_id), KEY time_created (time_created), KEY time_updated (time_updated) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;