<?php

defined('BASEPATH') OR exit('No direct script access allowed');

class Migration_Tbl_topic extends TT_migration {

    const table_name = 'tbl_topic';

    public function up() {
        $this->field_name('topic_id')->type('INT')->size(5)->auto_increment()->generate();
        $this->field_name('person_id')->type('INT')->size(11)->set_null()->generate();
        $this->field_name('parent_topic_id')->type('INT')->size(5)->set_null()->generate();
        $this->field_name('topic_name')->type('VARCHAR')->size(100)->set_null()->generate();
        $this->field_name('topic_status')->type('TINYINT')->size(1)->set_null()->generate();
        //'active=1;inactive=2;archived=3;pending=4;approved=5'
        $this->set_primary_key('topic_id')->set_table_name(self::table_name)->create();
    }

    public function down() {
        
    }

}
