forge->addField([ 'id' => [ 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true, ], 'organization_id' => [ 'type' => 'INT', 'constraint' => 11, 'unsigned' => true, ], 'name' => [ 'type' => 'VARCHAR', 'constraint' => 255, ], 'description' => [ 'type' => 'TEXT', 'null' => true, ], 'is_default' => [ 'type' => 'TINYINT', 'constraint' => 1, 'default' => 0, ], 'created_at' => [ 'type' => 'DATETIME', 'null' => true, ], 'updated_at' => [ 'type' => 'DATETIME', 'null' => true, ], ]); $this->forge->addKey('id', true); $this->forge->addForeignKey('organization_id', 'organizations', 'id', 'CASCADE', 'CASCADE'); $this->forge->createTable('task_boards'); } public function down() { $this->forge->dropTable('task_boards'); } }