<?php

class Migration_20250216222533_create_stream_url
{
    public static function up(PDO $pdo)
    {
        $sql = "
            CREATE TABLE IF NOT EXISTS `stream_url` (
                `id` INT NOT NULL AUTO_INCREMENT,
                `user_id` INT NOT NULL,
                `stream_url` TEXT NOT NULL,
                `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP NULL,
                `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP NULL,
                PRIMARY KEY (`id`)
            )
        ";

        $pdo->exec($sql);
    }

    public static function down(PDO $pdo)
    {
        $sql = "
            DROP TABLE IF EXISTS stream_url;
        ";

        $pdo->exec($sql);
    }
}