<?php
require __DIR__ . '/../../vendor/autoload.php';

define('ROOT_PATH', realpath(__DIR__ . '/../../'));
define('APP_PATH', ROOT_PATH . DIRECTORY_SEPARATOR . 'app');
define('CORE_PATH', ROOT_PATH . DIRECTORY_SEPARATOR . 'core');
define('VENDOR_PATH', ROOT_PATH . DIRECTORY_SEPARATOR . 'vendor');
define('CONFIG_PATH', APP_PATH . DIRECTORY_SEPARATOR . 'config');
define('STORAGE_PATH', ROOT_PATH . DIRECTORY_SEPARATOR . 'storage');

// Your test code goes here
// Your test code goes here
use Core\Database\SchemaOperator;
use Core\Database\Connection;

$databaseConfig = require CONFIG_PATH . DIRECTORY_SEPARATOR .'/database.php';

Connection::init($databaseConfig);
SchemaOperator::init(); // or "down"

// Create a table
SchemaOperator::createTable("testing", [
    "id" => "INT PRIMARY KEY AUTO_INCREMENT",
    "name" => "VARCHAR(255)",
    "email" => "VARCHAR(255) UNIQUE"
]);

echo "Table deleted successfully";