<?php

use Phalcon\Mvc\Model\Migration;
class PakDiskusiMigration_415 extends Migration {
    public function up()
    {
        self::$connection->execute("
            CREATE TABLE IF NOT EXISTS jaga.pak_diskusi
            (
                id bigserial not null primary key,
                ref_table character varying (30) not null,
                ref_id integer not null,
                content text,
                created_by integer not null,
                updated_by integer,
                deleted_by integer,
                created_at timestamp without time zone not null default now(),
                updated_at timestamp without time zone,
                deleted_at timestamp without time zone
            );
        ");
    }

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