Publier Globinours 1.0.0-rc.3
This commit is contained in:
parent
ea8c24d622
commit
9a2b4068da
325 changed files with 38230 additions and 20 deletions
17
migrations/076_privacy_and_access_log.sql
Normal file
17
migrations/076_privacy_and_access_log.sql
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
ALTER TABLE directory_contacts ADD COLUMN anonymized_at TEXT;
|
||||
ALTER TABLE directory_contacts ADD COLUMN anonymization_reason TEXT;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS private_file_access_log (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
user_id INTEGER REFERENCES users(id) ON DELETE SET NULL,
|
||||
resource_type TEXT NOT NULL,
|
||||
resource_id INTEGER,
|
||||
animal_id INTEGER REFERENCES animals(id) ON DELETE SET NULL,
|
||||
action TEXT NOT NULL DEFAULT 'view',
|
||||
original_name TEXT,
|
||||
ip_address TEXT,
|
||||
user_agent TEXT,
|
||||
accessed_at TEXT NOT NULL DEFAULT(datetime('now'))
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_private_access_date ON private_file_access_log(accessed_at DESC);
|
||||
CREATE INDEX IF NOT EXISTS idx_private_access_resource ON private_file_access_log(resource_type,resource_id);
|
||||
Loading…
Add table
Add a link
Reference in a new issue