<?php
namespace Core\Database\Operations;

use Core\Database\Schema;

use Core\Database\MigrationOperation;

class CreateTable implements MigrationOperation
{
    protected string $table;
    protected array $columns;

    public function __construct(string $table, array $columns)
    {
        $this->table = $table;
        $this->columns = $columns;
    }

    public function up(){
        // Logic for creating the table
        Schema::createTable($this->table, $this->columns);
    }

    public function down()
    {
        // Logic for dropping the table
        Schema::dropTable($this->table);
    }
}
