<?php 

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

/**
 * Class DesaKegiatanPenyerapanMigration_148
 */
class DesaKegiatanPenyerapanMigration_148 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.desa_kegiatan_penyerapan
				(
					kode character varying(10) NOT NULL,
					nama text NOT NULL,
					kode_bidang character varying(10) NOT NULL,
					PRIMARY KEY (kode),
					FOREIGN KEY (kode_bidang)
						REFERENCES jaga.desa_bidang_penyerapan (kode) MATCH SIMPLE
						ON UPDATE NO ACTION
						ON DELETE NO ACTION
				);
			'
		);
    }

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

    }

}
