forge->addField([ 'id' => [ 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true, ], 'id_pelanggan' => [ 'type' => 'INT', 'constraint' => 11, ], 'keluhan' => [ 'type' => 'TEXT', ], 'status' => [ 'type' => 'ENUM', 'constraint' => ['1', '0'], 'default' => '0', ], 'created_at' => [ 'type' => 'TIMESTAMP', 'default' => new RawSql('CURRENT_TIMESTAMP'), ], 'updated_at' => [ 'type' => 'TIMESTAMP', 'default' => new RawSql('CURRENT_TIMESTAMP'), ], ]); $this->forge->addKey('id', true); $this->forge->createTable('ticket'); } public function down() { $this->forge->dropTable('ticket'); } }