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

class CreateSpiPerluasanEreportFilesMigration_558 extends Migration {
    public function up()
    {
        self::$connection->execute('
            CREATE TABLE IF NOT EXISTS "jaga"."spi_perluasan_ereport_files" (
                id SERIAL PRIMARY KEY,
                id_instansi INTEGER NOT NULL,
                tahun VARCHAR(4),
                filename VARCHAR(250)
            );
        ');

        // SQL data can be found in jaga-phalcon#179 if needed
    }

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