<?php

use Phalcon\Mvc\Model\Migration;

class StranasSnapshotMigration_399 extends Migration {
    public function up() {
        return; // migrasi dibatalkan
        self::$connection->execute("
            DROP TABLE if exists jaga.str_snapshot CASCADE;
            DROP SEQUENCE if exists jaga.str_snapshot_id_seq;

            CREATE SEQUENCE jaga.str_snapshot_id_seq
                INCREMENT 1
                START 1
                MINVALUE 1
                MAXVALUE 9223372036854775807
                CACHE 1;
            CREATE TABLE jaga.str_snapshot
            (
                id integer NOT NULL DEFAULT nextval('jaga.str_snapshot_id_seq'::regclass),
                id_periode integer NOT NULL,
                id_triwulan integer NOT NULL,
                created_by integer,
                created_at timestamp without time zone,
                CONSTRAINT str_snapshot_pkey PRIMARY KEY (id)
            );
        ");
    }

    public function down() {
        return; // migrasi dibatalkan
        self::$connection->execute("
            DROP TABLE if exists jaga.str_snapshot CASCADE;
            DROP SEQUENCE if exists jaga.str_snapshot_id_seq;
        ");
    }
}