forge->addField([ 'HostAppID' => ['type' => 'VARCHAR', 'constraint' => 5, 'null' => false], 'HostAppName' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => false], 'SiteID' => ['type' => 'INT', 'unsigned' => true, 'null' => true], 'CreateDate' => ['type' => 'DATETIME', 'null' => true], 'EndDate' => ['type' => 'DATETIME', 'null' => true] ]); $this->forge->addKey('HostAppID', true); $this->forge->createTable('hostapp'); // Table: hostcompara $this->forge->addField([ 'HostAppID' => ['type' => 'VARCHAR', 'constraint' => 5, 'null' => false], 'HostIP' => ['type' => 'VARCHAR', 'constraint' => 15, 'null' => true], 'HostPort' => ['type' => 'VARCHAR', 'constraint' => 6, 'null' => true], 'HostPwd' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true], 'CreateDate' => ['type' => 'DATETIME', 'null' => true], 'EndDate' => ['type' => 'DATETIME', 'null' => true] ]); $this->forge->addKey('HostAppID', true); $this->forge->createTable('hostcompara'); // Table: codingsys $this->forge->addField([ 'CodingSysID' => ['type' => 'INT', 'unsigned' => true, 'auto_increment' => true], 'CodingSysAbb' => ['type' => 'VARCHAR', 'constraint' => 6, 'null' => false, 'unique' => true], 'FullText' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true], 'Description' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true], 'CreateDate' => ['type' => 'DATETIME', 'null' => true], 'EndDate' => ['type' => 'DATETIME', 'null' => true] ]); $this->forge->addKey('CodingSysID', true); $this->forge->createTable('codingsys'); } public function down() { $this->forge->dropTable('codingsys'); $this->forge->dropTable('hostcompara'); $this->forge->dropTable('hostapp'); } }