Site icon Hip-Hop Website Design and Development

Some error in mysql script ? Can’t working to create table

Has some wrong in my code ???
please help

<?php
    global $lots_db_version;
    $lots_db_version = '1.0';
    
    function lots_install() {
        global $wpdb;
        global $lots_db_version;
        
        $table_name = $wpdb->prefix . 'auction_lots';
        
        $charset_collate = $wpdb->get_charset_collate();
        
        $sql = "CREATE TABLE $table_name (
            id mediumint(9) NOT NULL AUTO_INCREMENT,
            product_id mediumint(9) UNSIGNED NOT NULL,
            finish_time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
            user_id mediumint(9) UNSIGNED,
            start_price decimal(10,2),
            v_min_price decimal(10,2),
            last_bid_price decimal(10,2),
            last_price decimal(10,2),
            status tinyint(1),
            PRIMARY KEY  (id)
        ) $charset_collate;";
        require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
        dbDelta( $sql );
    
        add_option( 'lots_db_version', $lots_db_version );
    }
    
    register_activation_hook( __FILE__, 'lots_install' );