Created
January 5, 2018 17:44
-
-
Save holisticnetworking/108983bec87b653322e27d9b65305236 to your computer and use it in GitHub Desktop.
Table creation for scheduling.
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
private function do_table() { | |
global $wpdb; | |
$charset_collate = $wpdb->get_charset_collate(); | |
$sql = "CREATE TABLE $this->table_name ( | |
id mediumint(9) NOT NULL AUTO_INCREMENT, | |
created datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, | |
modified datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, | |
interval TEXT NOT NULL, | |
object_type TEXT NOT NULL, | |
PRIMARY KEY (id) | |
) $charset_collate;"; | |
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); | |
dbDelta( $sql ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment