Add TuxiNet branding and document templates
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use PDO;
|
||||
|
||||
return function (PDO $pdo): void {
|
||||
$pdo->exec(<<<SQL
|
||||
CREATE TABLE issues (
|
||||
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
|
||||
project_id INT UNSIGNED NOT NULL,
|
||||
type ENUM('bug','feature','task') NOT NULL,
|
||||
priority ENUM('low','medium','high','urgent') NOT NULL DEFAULT 'medium',
|
||||
status ENUM('new','in_progress','in_review','resolved','closed') NOT NULL DEFAULT 'new',
|
||||
assignee_id INT UNSIGNED NULL,
|
||||
title VARCHAR(255) NOT NULL,
|
||||
description TEXT NOT NULL,
|
||||
environment VARCHAR(50) NULL,
|
||||
version VARCHAR(100) NULL,
|
||||
steps_to_reproduce TEXT NULL,
|
||||
created_by INT UNSIGNED NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
CONSTRAINT fk_issues_project FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE,
|
||||
CONSTRAINT fk_issues_assignee FOREIGN KEY (assignee_id) REFERENCES users(id) ON DELETE SET NULL,
|
||||
CONSTRAINT fk_issues_creator FOREIGN KEY (created_by) REFERENCES users(id) ON DELETE CASCADE,
|
||||
INDEX idx_issues_project_status (project_id, status),
|
||||
INDEX idx_issues_priority (priority),
|
||||
INDEX idx_issues_assignee (assignee_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
SQL);
|
||||
};
|
||||
Reference in New Issue
Block a user