<?php

/**
 * Roadmap Table Installer
 *
 * Handles creation of roadmap database tables
 *
 * @package ProRankSEO\Database
 * @since   1.0.0
 */

declare(strict_types=1);

namespace ProRank\SEO\Database;

use ProRank\SEO\Database\Schema\RoadmapItemsSchema;

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


/**
 * Class RoadmapTableInstaller
 */


class RoadmapTableInstaller {
    
    /**
     * Install roadmap tables
     */
    public static function install(): void {
        require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
        
        $sql = RoadmapItemsSchema::get_schema();
        dbDelta($sql);
    }
    
    /**
     * Uninstall roadmap tables
     */
    public static function uninstall(): void {
        RoadmapItemsSchema::drop_table();
    }
}