feat: added audit logs table to the database
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
This commit is contained in:
parent
946085a18f
commit
e8de96b2d0
3 changed files with 41 additions and 0 deletions
14
migrations/2025-08-04-195527_add_audit_log/up.sql
Normal file
14
migrations/2025-08-04-195527_add_audit_log/up.sql
Normal file
|
@ -0,0 +1,14 @@
|
|||
-- Your SQL goes here
|
||||
CREATE TABLE audit_logs (
|
||||
uuid UUID PRIMARY KEY NOT NULL,
|
||||
guild_uuid UUID NOT NULL,
|
||||
action_id INT2 NOT NULL,
|
||||
by_uuid UUID NOT NULL REFERENCES guild_members(uuid),
|
||||
channel_uuid UUID REFERENCES channels(uuid) DEFAULT NULL,
|
||||
user_uuid UUID REFERENCES users(uuid) DEFAULT NULL,
|
||||
message_uuid UUID REFERENCES messages(uuid) DEFAULT NULL,
|
||||
role_uuid UUID REFERENCES roles(uuid) DEFAULT NULL,
|
||||
audit_message VARCHAR(200) DEFAULT NULL,
|
||||
changed_from VARCHAR(200) DEFAULT NULL,
|
||||
changed_to VARCHAR(200) DEFAULT NULL
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue