runtipi/packages/cli/assets/migrations/00000-create-migrations-table.sql
2023-08-28 20:23:51 +02: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
);