<?php
$db_version = sql_fetch_row(sql_query('SELECT version()'))[0];
[$major, $minor] = explode('.', $db_version);
if ((int)$major >= 10 && (int)$minor >= 2) {
    run_query('CREATE TABLE IF NOT EXISTS ' . $config['table_prefix'] . 'input_queue (
        id SERIAL PRIMARY KEY,
        input TEXT,
        status TEXT,
        created_by TEXT,
        time DATE DEFAULT CURDATE()
    )');
} else {
    run_query('CREATE TABLE IF NOT EXISTS ' . $config['table_prefix'] . 'input_queue (
        id SERIAL PRIMARY KEY,
        input TEXT,
        status TEXT,
        created_by TEXT,
        time DATETIME DEFAULT NOW()
    )');
}
