- Add cleaned_at and cleaned_by_user_id fields to reports table - Create database migration for cleanup tracking - Add markAsCleaned backend endpoint and service method - Add Mark as Cleaned Up button to ReportDetailModal - Update types to include cleaned fields - Add frontend handler to mark reports as cleaned
11 lines
372 B
SQL
11 lines
372 B
SQL
-- Add cleaned_at and cleaned_by_user_id fields to reports table
|
|
ALTER TABLE `reports`
|
|
ADD COLUMN `cleaned_at` TIMESTAMP NULL,
|
|
ADD COLUMN `cleaned_by_user_id` VARCHAR(36) NULL,
|
|
ADD INDEX `idx_cleaned_at` (`cleaned_at`),
|
|
ADD CONSTRAINT `reports_cleaned_by_fk`
|
|
FOREIGN KEY (`cleaned_by_user_id`)
|
|
REFERENCES `users`(`id`)
|
|
ON DELETE SET NULL
|
|
ON UPDATE NO ACTION;
|