create_table( 'events', 'id bigint(20) unsigned NOT NULL AUTO_INCREMENT, title varchar(190) NOT NULL DEFAULT \'\', starts_on date DEFAULT NULL, ends_on date DEFAULT NULL, location varchar(190) NOT NULL DEFAULT \'\', capacity int(10) unsigned NOT NULL DEFAULT 0, price decimal(14,2) NOT NULL DEFAULT 0, deposit decimal(14,2) NOT NULL DEFAULT 0, currency char(3) NOT NULL DEFAULT \'\', balance_days smallint(5) unsigned NOT NULL DEFAULT 30, page_id bigint(20) unsigned NOT NULL DEFAULT 0, product_id bigint(20) unsigned NOT NULL DEFAULT 0, match_text varchar(190) NOT NULL DEFAULT \'\', status varchar(10) NOT NULL DEFAULT \'open\', notes text, created_at datetime NOT NULL, updated_at datetime NOT NULL, PRIMARY KEY (id), KEY starts_on (starts_on)' ); $this->create_table( 'people', 'id bigint(20) unsigned NOT NULL AUTO_INCREMENT, event_id bigint(20) unsigned NOT NULL, contact_id bigint(20) unsigned NOT NULL, deal_id bigint(20) unsigned NOT NULL DEFAULT 0, seats smallint(5) unsigned NOT NULL DEFAULT 1, amount decimal(14,2) NOT NULL DEFAULT 0, paid decimal(14,2) NOT NULL DEFAULT 0, status varchar(12) NOT NULL DEFAULT \'interested\', attended tinyint(1) NOT NULL DEFAULT 0, source varchar(100) NOT NULL DEFAULT \'\', paid_at datetime DEFAULT NULL, created_at datetime NOT NULL, updated_at datetime NOT NULL, PRIMARY KEY (id), UNIQUE KEY event_contact (event_id,contact_id), KEY contact_id (contact_id), KEY deal_id (deal_id)' ); } public function boot() { Nodebook_Gatherings::boot(); if ( is_admin() ) { Nodebook_Admin_Gatherings::boot(); } } public function uninstall() { delete_option( 'nodebook_mod_gatherings_deals' ); parent::uninstall(); } }