<?php
if ( !defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

global $wpdb;

require_once ABSPATH . 'wp-admin/includes/upgrade.php';

dbDelta( "CREATE TABLE {$wpdb->prefix}mobile_api_logs (
	log_id INT(11) NOT NULL AUTO_INCREMENT,
	ad_key INT(11) NOT NULL,
	post_id INT(11) NOT NULL,
	action VARCHAR(255) NOT NULL,
	timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
	PRIMARY KEY (log_id)
);
" );