Initial commit of the Asset Management System, including project structure, Docker configuration, database migrations, and core application files. Added user authentication, asset management features, and basic UI components.
This commit is contained in:
15
database/migrations/009_create_inventories_table.sql
Normal file
15
database/migrations/009_create_inventories_table.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
CREATE TABLE inventories (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
description TEXT,
|
||||
started_by INT,
|
||||
started_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
closed_at TIMESTAMP NULL,
|
||||
status ENUM('offen', 'abgeschlossen') DEFAULT 'offen',
|
||||
kommentar TEXT,
|
||||
FOREIGN KEY (started_by) REFERENCES users(id) ON DELETE SET NULL,
|
||||
INDEX idx_started_by (started_by),
|
||||
INDEX idx_status (status),
|
||||
INDEX idx_started_at (started_at),
|
||||
INDEX idx_closed_at (closed_at)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
Reference in New Issue
Block a user