poudboot/migrations/01_init.sql
Tom Alexander 5b8880252b
All checks were successful
build-poudboot Build build-poudboot has succeeded
format Build format has succeeded
rust-clippy Build rust-clippy has succeeded
rust-test Build rust-test has succeeded
Add an action to update jails automatically.
I probably will only use this for end-user systems like a laptop but not for servers so I can pick when I need to reboot my servers.
2024-05-08 09:50:09 -04:00

23 lines
600 B
SQL

PRAGMA foreign_keys = ON;
CREATE TABLE IF NOT EXISTS global_action (
name TEXT NOT NULL PRIMARY KEY,
next_run INTEGER DEFAULT 0 NOT NULL
);
CREATE TABLE IF NOT EXISTS jail_action (
name TEXT NOT NULL,
jail_name TEXT NOT NULL,
next_run INTEGER DEFAULT 0 NOT NULL,
PRIMARY KEY (name, jail_name)
);
CREATE TABLE IF NOT EXISTS local_action (
name TEXT NOT NULL,
jail_name TEXT NOT NULL,
tree TEXT NOT NULL,
set_name TEXT NOT NULL,
next_run INTEGER DEFAULT 0 NOT NULL,
PRIMARY KEY (name, jail_name, tree, set_name)
);