Add AI DEV Node deployment foundation
This commit is contained in:
15
migrations/002_audit_log.sql
Normal file
15
migrations/002_audit_log.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
-- Ported from backend/src/main/resources/db/migration/V2__audit_log.sql
|
||||
|
||||
CREATE TABLE audit_logs (
|
||||
id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
|
||||
created_at TIMESTAMP NOT NULL,
|
||||
updated_at TIMESTAMP NOT NULL,
|
||||
actor_id BIGINT,
|
||||
actor_username VARCHAR(50),
|
||||
action VARCHAR(30) NOT NULL,
|
||||
target_type VARCHAR(30),
|
||||
target_id BIGINT,
|
||||
detail VARCHAR(500)
|
||||
);
|
||||
CREATE INDEX idx_audit_created_at ON audit_logs (created_at);
|
||||
CREATE INDEX idx_audit_action ON audit_logs (action);
|
||||
Reference in New Issue
Block a user