<?php

use Phalcon\Mvc\Model\Migration;

class ProfilDaerahMigration_319 extends Migration
{
    public function up()
    {
        $this->down();

        $sql1 = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'profil_daerah_kepadatan_penduduk.sql');
        self::$connection->execute($sql1);

        $sql2 = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'profil_daerah_audit_bpk.sql');
        self::$connection->execute($sql2);

        $sql3 = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'profil_daerah_nilai_lakip.sql');
        self::$connection->execute($sql3);
    }

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

        self::$connection->execute('
            DROP TABLE IF EXISTS "jaga"."profil_daerah_audit_bpk";
        ');

        self::$connection->execute('
            DROP TABLE IF EXISTS "jaga"."profil_daerah_nilai_lakip";
        ');
    }
}
