forge->addField([ 'id' => [ 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true, ], 'module_code' => [ 'type' => 'VARCHAR', 'constraint' => 50, ], 'name' => [ 'type' => 'VARCHAR', 'constraint' => 100, ], 'description' => [ 'type' => 'VARCHAR', 'constraint' => 255, ], 'price_monthly' => [ 'type' => 'INT', 'constraint' => 11, 'default' => 0, ], 'price_yearly' => [ 'type' => 'INT', 'constraint' => 11, 'default' => 0, ], 'trial_days' => [ 'type' => 'INT', 'constraint' => 11, 'default' => 0, ], 'is_active' => [ 'type' => 'TINYINT', 'constraint' => 1, 'default' => 1, ], 'created_at' => [ 'type' => 'DATETIME', 'null' => true, ], 'updated_at' => [ 'type' => 'DATETIME', 'null' => true, ], ]); $this->forge->addKey('id', true); $this->forge->addUniqueKey('module_code'); $this->forge->createTable('module_settings'); } public function down() { $this->forge->dropTable('module_settings', true); } }