dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

82.sql (548B)


      1 -- +migrate Up
      2 CREATE TABLE IF NOT EXISTS security_logs (
      3     id INTEGER NOT NULL PRIMARY KEY,
      4     user_id INTEGER NOT NULL,
      5     message TEXT NOT NULL,
      6     typ INTEGER NOT NULL,
      7     created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
      8     CONSTRAINT security_logs_user_id_fk
      9         FOREIGN KEY (user_id)
     10             REFERENCES users (id)
     11             ON DELETE CASCADE
     12             ON UPDATE CASCADE);
     13 CREATE INDEX security_logs_user_id_idx ON security_logs (user_id);
     14 CREATE INDEX security_logs_typ_idx ON security_logs (typ);
     15 
     16 -- +migrate Down