You've already forked php-auth
generated from siteworxpro/Php-Template
Add audit logging functionality with database schema and event handling
Some checks failed
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 2m23s
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 2m35s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 2m25s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 2m39s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Failing after 2m26s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Failing after 1m5s
Some checks failed
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 2m23s
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 2m35s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 2m25s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 2m39s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Failing after 2m26s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Failing after 1m5s
This commit is contained in:
14
db/migrations/000002_create_audit_table.up.sql
Normal file
14
db/migrations/000002_create_audit_table.up.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
create table audit_logs
|
||||
(
|
||||
id VARCHAR(26) not null
|
||||
constraint audit_logs_pkey
|
||||
primary key,
|
||||
user_id integer,
|
||||
action varchar(255) not null,
|
||||
timestamp timestamptz default current_timestamp,
|
||||
details jsonb
|
||||
);
|
||||
|
||||
create index idx_audit_logs_action on audit_logs (action);
|
||||
create index idx_audit_logs_user_id on audit_logs (user_id);
|
||||
create index idx_audit_logs_timestamp on audit_logs (timestamp);
|
||||
Reference in New Issue
Block a user