forge->addField([ 'CTID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true], 'SiteID' => ['type' => 'INT', 'null' => true], 'CTGroup' => ['type' => 'INT', 'null' => true], 'CT' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => false], 'Description' => ['type' => 'varchar', 'constraint' => 255, 'null' => true], 'FontStyle' => ['type' => 'int', 'null' => true], 'Category' => ['type' => 'int', 'null' => true], 'CreateDate' => ['type' => 'DATETIME', 'null' => true], 'EndDate' => ['type' => 'DATETIME', 'null' => true] ]); $this->forge->addKey('CTID', true); $this->forge->createTable('codedtxt'); $this->forge->addField([ 'CTFldID' => ['type' => 'INT', 'auto_increment' => true, 'unsigned' => true], 'SiteID' => ['type' => 'INT', 'null' => true], 'TblName' => ['type' => 'Varchar', 'constraint' => 255, 'null' => true], 'FldName' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => false], 'CTGroup' => ['type' => 'INT', 'null' => true], 'CreateDate' => ['type' => 'DATETIME', 'null' => true], 'EndDate' => ['type' => 'DATETIME', 'null' => true] ]); $this->forge->addKey('CTFldID', true); $this->forge->createTable('codedtxtfld'); } public function down() { $this->forge->dropTable('codedtxt'); $this->forge->dropTable('codedtxtfld'); } }