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,82 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class CreateTasksTable extends Migration
{
public function up()
{
$this->forge->addField([
'id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
'auto_increment' => true,
],
'organization_id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
],
'board_id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
],
'column_id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
],
'title' => [
'type' => 'VARCHAR',
'constraint' => 255,
],
'description' => [
'type' => 'TEXT',
'null' => true,
],
'priority' => [
'type' => 'ENUM',
'constraint' => ['low', 'medium', 'high', 'urgent'],
'default' => 'medium',
],
'due_date' => [
'type' => 'DATE',
'null' => true,
],
'completed_at' => [
'type' => 'DATETIME',
'null' => true,
],
'order_index' => [
'type' => 'INT',
'constraint' => 11,
'default' => 0,
],
'created_by' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
],
'created_at' => [
'type' => 'DATETIME',
'null' => true,
],
'updated_at' => [
'type' => 'DATETIME',
'null' => true,
],
]);
$this->forge->addKey('id', true);
// Все внешние ключи убраны - ссылочная целостность контролируется на уровне приложения
$this->forge->createTable('tasks');
}
public function down()
{
$this->forge->dropTable('tasks');
}
}