runtipi/packages/worker/assets/migrations/00000-create-migrations-table.sql
2023-11-16 20:49:27 +01:00

6 lines
311 B
SQL

CREATE TABLE IF NOT EXISTS migrations (
id integer PRIMARY KEY,
name varchar(100) UNIQUE NOT NULL,
hash varchar(40) NOT NULL, -- sha1 hex encoded hash of the file name and contents, to ensure it hasn't been altered since applying the migration
executed_at timestamp DEFAULT CURRENT_TIMESTAMP
);