start tasks module

This commit is contained in:
root
2026-01-23 08:48:06 +03:00
parent 283b9132a0
commit 725c62a179
22 changed files with 2489 additions and 6 deletions
@@ -0,0 +1,60 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class CreateTaskColumnsTable extends Migration
{
public function up()
{
$this->forge->addField([
'id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
'auto_increment' => true,
],
'board_id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
],
'name' => [
'type' => 'VARCHAR',
'constraint' => 255,
],
'color' => [
'type' => 'VARCHAR',
'constraint' => 7,
'default' => '#6B7280',
],
'order_index' => [
'type' => 'INT',
'constraint' => 11,
'default' => 0,
],
'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('board_id', 'task_boards', 'id', 'CASCADE', 'CASCADE');
$this->forge->createTable('task_columns');
}
public function down()
{
$this->forge->dropTable('task_columns');
}
}