<?php 

use Phalcon\Db\Column;
use Phalcon\Db\Index;
use Phalcon\Db\Reference;
use Phalcon\Mvc\Model\Migration;

/**
 * Class NotificationBlastMigration_145
 */
class NotificationBlastMigration_145 extends Migration
{
    /**
     * Define the table structure
     *
     * @return void
     */
    public function morph()
    {
        
    }

    /**
     * Run the migrations
     *
     * @return void
     */
    public function up()
    {
		self::$connection->execute(
			'
				CREATE TABLE jaga.notification_blast
				(
					id serial NOT NULL,
					judul character varying(150) NOT NULL,
					konten text NOT NULL,
					keterangan text NOT NULL,
					parameter text NOT NULL,
					created_at timestamp without time zone NOT NULL DEFAULT now(),
					updated_at timestamp without time zone NOT NULL DEFAULT now(),
					deleted_at timestamp without time zone,
					user_id integer NOT NULL,
					tenant_id integer NOT NULL DEFAULT -1234,
					PRIMARY KEY (id),
					FOREIGN KEY (user_id, tenant_id)
						REFERENCES public.um_user (um_id, um_tenant_id) MATCH SIMPLE
						ON UPDATE NO ACTION
						ON DELETE NO ACTION
				);
			'
		);
    }

    /**
     * Reverse the migrations
     *
     * @return void
     */
    public function down()
    {

    }

}
