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/007_create_asset_assignments_table.sql
Normal file
15
database/migrations/007_create_asset_assignments_table.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
CREATE TABLE asset_assignments (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
asset_id INT NOT NULL,
|
||||
user_id INT NOT NULL,
|
||||
von DATE NOT NULL,
|
||||
bis DATE,
|
||||
kommentar TEXT,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (asset_id) REFERENCES assets(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
|
||||
INDEX idx_asset_id (asset_id),
|
||||
INDEX idx_user_id (user_id),
|
||||
INDEX idx_von (von),
|
||||
INDEX idx_bis (bis)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
Reference in New Issue
Block a user