Files
start-os/appmgr/migrations/20210629193146_Init.sql
Keagan McClelland 1059ccfc96 Feature/ssh (#382)
* wip ssh feature

* add and remove complete, list remains

* list half way done

* should finish the ssh module completely

* minor fixes

* formatting and offline queries

Co-authored-by: Aiden McClelland <me@drbonez.dev>
2022-01-21 20:35:52 -07:00

28 lines
741 B
SQL

-- Add migration script here
CREATE TABLE IF NOT EXISTS tor
(
package TEXT NOT NULL,
interface TEXT NOT NULL,
key BLOB NOT NULL,
PRIMARY KEY (package, interface)
);
CREATE TABLE IF NOT EXISTS session
(
id TEXT NOT NULL PRIMARY KEY,
logged_in TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
logged_out TIMESTAMP,
last_active TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
user_agent TEXT,
metadata TEXT NOT NULL DEFAULT 'null'
);
CREATE TABLE IF NOT EXISTS password
(
hash TEXT NOT NULL PRIMARY KEY
);
CREATE TABLE IF NOT EXISTS ssh_keys
(
fingerprint TEXT NOT NULL,
openssh_pubkey TEXT NOT NULL,
created_at TEXT NOT NULL,
PRIMARY KEY (fingerprint)
);