fix(ui): remove extra closing div causing bugtracker layout shift & enforce non-destructive SQL schema migrations

This commit is contained in:
Deploymentcenter Bot
2026-08-06 13:10:20 +02:00
parent 563046be07
commit cb52298c7a
3 changed files with 106 additions and 147 deletions
@@ -1,15 +1,9 @@
-- Migration 004: Unified Tokens (Master & Sub-Tokens) and Bugtracker / Feature-Tracker Module
-- Migration 004: Unified Tokens (Master & Sub-Tokens) and Bugtracker / Feature-Tracker Module (Non-destructive)
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS bugtracker_comments;
DROP TABLE IF EXISTS bugtracker_items;
DROP TABLE IF EXISTS dc_tokens;
SET FOREIGN_KEY_CHECKS = 1;
-- 1. Central Master & Sub-Token Hierarchy Table
CREATE TABLE dc_tokens (
CREATE TABLE IF NOT EXISTS dc_tokens (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
token_id VARCHAR(64) NOT NULL UNIQUE,
parent_token_id VARCHAR(64) NULL,
@@ -31,7 +25,7 @@ CREATE TABLE dc_tokens (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 2. Unified Bugtracker & Feature Request Items
CREATE TABLE bugtracker_items (
CREATE TABLE IF NOT EXISTS bugtracker_items (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
project_id INT NULL,
project_slug VARCHAR(64) NOT NULL,
@@ -59,7 +53,7 @@ CREATE TABLE bugtracker_items (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- 3. Diagnostic Comments & Timeline Table
CREATE TABLE bugtracker_comments (
CREATE TABLE IF NOT EXISTS bugtracker_comments (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
item_id BIGINT NOT NULL,
author VARCHAR(100) NOT NULL,
@@ -70,9 +64,9 @@ CREATE TABLE bugtracker_comments (
FOREIGN KEY (item_id) REFERENCES bugtracker_items(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- Seed Sample Master Token
-- Raw Master Token: dc_master_myapp_dev_agent_001
-- Hash: SHA256 of 'dc_master_myapp_dev_agent_001'
SET FOREIGN_KEY_CHECKS = 1;
-- Seed Sample Master Token (Non-destructive)
INSERT INTO dc_tokens (
token_id, parent_token_id, token_hash, raw_token, name, project_slug, owner_type, owner_identity, type, scopes, environment
) VALUES (
@@ -83,9 +77,9 @@ INSERT INTO dc_tokens (
'myapp', 'dev_agent', 'DEV-WORKSTATION-01', 'master',
'["bugtracker:report", "bugtracker:manage", "watchdog:ping", "updateservice:read"]',
'all'
);
) ON DUPLICATE KEY UPDATE token_id = token_id;
-- Seed Sample Sub Token provisioned from Master Token
-- Seed Sample Sub Token provisioned from Master Token (Non-destructive)
INSERT INTO dc_tokens (
token_id, parent_token_id, token_hash, raw_token, name, project_slug, owner_type, owner_identity, type, scopes, environment
) VALUES (
@@ -96,19 +90,21 @@ INSERT INTO dc_tokens (
'myapp', 'dev_agent', 'DEV-WORKSTATION-01', 'sub',
'["bugtracker:report", "bugtracker:manage"]',
'development'
);
) ON DUPLICATE KEY UPDATE token_id = token_id;
-- Seed Sample Bugs and Feature Requests
-- Seed Sample Bugs and Feature Requests (Non-destructive)
INSERT INTO bugtracker_items (
id, project_slug, type, title, description, error_message, stack_trace, error_hash, build_version, environment, severity, status, occurrence_count, created_by
) VALUES
(1, 'myapp', 'bug', 'NullReferenceException in UserAuthService.cs line 42', 'Beim Login ohne gesetzte Session ist ein Unerwarteter Nullpointer-Fehler aufgetreten.', 'NullReferenceException: Object reference not set to an instance of an object.', 'at MyApp.Core.UserAuthService.ValidateToken(String token) in UserAuthService.cs:line 42\nat MyApp.Controllers.AuthController.Login() in AuthController.cs:line 18', 'e2c918a514d89a42f', 'v1.4.2-dev', 'development', 'high', 'open', 3, 'agent:dev-monitor-01'),
(2, 'polytrader', 'bug', 'Database Connection Timeout on Order Execution', 'Unter hoher Last bricht die Verbindung zur MariaDB nach 30s ab.', 'SQLSTATE[HY000] [2002] Connection timed out', 'PDOException: SQLSTATE[HY000] [2002] Connection timed out at Db.php:24', 'f9a2b881c1092837d', 'v2.0.1', 'production', 'critical', 'in_progress', 14, 'agent:prod-watchdog'),
(3, 'myapp', 'feature_request', 'Unterstützung für TOTP 2FA Login erzwingen', 'KI-Agent empfiehlt die Hinzufügung einer erzwungenen Zwei-Faktor-Authentifizierung für Administrator-Konten.', NULL, NULL, NULL, 'v1.5.0-roadmap', 'development', 'medium', 'open', 1, 'agent:security-agent');
(3, 'myapp', 'feature_request', 'Unterstützung für TOTP 2FA Login erzwingen', 'KI-Agent empfiehlt die Hinzufügung einer erzwungenen Zwei-Faktor-Authentifizierung für Administrator-Konten.', NULL, NULL, NULL, 'v1.5.0-roadmap', 'development', 'medium', 'open', 1, 'agent:security-agent')
ON DUPLICATE KEY UPDATE id = id;
-- Seed Sample Comments
-- Seed Sample Comments (Non-destructive)
INSERT INTO bugtracker_comments (
item_id, author, comment, action_taken, created_at
id, item_id, author, comment, action_taken, created_at
) VALUES
(1, 'agent:code-fixer-01', 'Log-Analyse gestartet. Der Fehler tritt auf, wenn $_SESSION["dc_user_id"] nicht gesetzt ist.', 'investigated', NOW()),
(2, 'agent:db-optimizer', 'Max Connection Limit in config.php auf 100 erhöht. Connection Pool wird beobachtet.', 'added_hint', NOW());
(1, 1, 'agent:code-fixer-01', 'Log-Analyse gestartet. Der Fehler tritt auf, wenn $_SESSION["dc_user_id"] nicht gesetzt ist.', 'investigated', NOW()),
(2, 2, 'agent:db-optimizer', 'Max Connection Limit in config.php auf 100 erhöht. Connection Pool wird beobachtet.', 'added_hint', NOW())
ON DUPLICATE KEY UPDATE id = id;