<?php

use Openguru\OpenCartFramework\Migrations\Migration;

return new class extends Migration {
    public function up(): void
    {
        $sql = <<<SQL
CREATE TABLE IF NOT EXISTS `telecart_forms` (
    `id` bigint(11) AUTO_INCREMENT PRIMARY KEY,
    `alias` varchar(100) NOT NULL,
    `friendly_name` varchar(100) NOT NULL,
    `is_custom` tinyint(1) NOT NULL DEFAULT 0,
    `schema` longtext NOT NULL,
    `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) collate = utf8_unicode_ci
SQL;

        $this->database->statement($sql);
    }
};
