prefix}give_log"; $charset = DB::get_charset_collate(); $sql = "CREATE TABLE {$table} ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, log_type VARCHAR(16) NOT NULL, data text NOT NULL, category VARCHAR(64) NOT NULL, source VARCHAR(64) NOT NULL, date DATETIME NOT NULL, PRIMARY KEY (id), KEY log_type (log_type), KEY category (category), KEY source (source) ) {$charset}"; try { DB::delta($sql); } catch (DatabaseQueryException $exception) { throw new DatabaseMigrationException('An error occurred while creating the give_log table', 0, $exception); } } }