<?php

namespace GemBoards\Database;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}


class CreateFavouriteBoardsTable {

	public static function up( $prefix, $charset_collate ) {
		$table_name = $prefix . 'gemboards_favourite_boards';
		$sql        = "CREATE TABLE $table_name (
            id BIGINT(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
            board_id BIGINT(20) UNSIGNED NOT NULL,
            user_id BIGINT(20) UNSIGNED DEFAULT NULL,
            sort_order INT DEFAULT 0
        ) $charset_collate;";
		dbDelta( $sql );
	}

}
