<?php
use Phalcon\Mvc\Model\Migration;

class UserTerlaporMigration_223 extends Migration
{
    public function up()
    {
        self::$connection->execute("
            CREATE TABLE jaga.user_terlapor (
                id SERIAL PRIMARY KEY,
                id_user_pelapor INT,
                id_user_terlapor INT,
                id_diskusi INT,
                id_komentar INT,
                id_kategori INT,
                lainnya TEXT DEFAULT null,
                isi TEXT,
                status INT,
                created_at timestamp(6) DEFAULT now(),
                updated_at timestamp(6) DEFAULT now(),
                deleted_at timestamp(6),
                created_by int,
                updated_by int	
            );
        ");
    }

    public function down()
    {
        self::$connection->execute("
            DROP TABLE jaga.user_terlapor
        ");
    }
}
