Created
September 11, 2012 20:00
-
-
Save chrisjdavis/3701597 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function action_init() { | |
DB::register_table( 'activity' ); | |
} | |
public function action_plugin_activation( $file ) { | |
$q = "CREATE TABLE " . DB::table('activity') . " ( | |
id int(11) unsigned NOT NULL AUTO_INCREMENT, | |
user_id int(11) DEFAULT NULL, | |
owner_id int(11) DEFAULT NULL, | |
company_id int(11) DEFAULT NULL, | |
parent_id int(11) DEFAULT NULL, | |
object_id int(11) DEFAULT NULL, | |
date int(11) DEFAULT NULL, | |
message varchar(512) DEFAULT NULL, | |
type int(11) DEFAULT NULL, | |
PRIMARY KEY (id) | |
) ENGINE=MyISAM DEFAULT CHARSET=latin1;"; | |
return $sql = DB::dbdelta( $q ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment