fix(sql-migrate): use portable SQL in _migrations table (closes #37)

This commit is contained in:
AJ ONeal 2026-03-23 11:26:47 -06:00 committed by AJ ONeal
parent a854fef67e
commit 4895012d67

View File

@ -48,9 +48,9 @@ const (
-- --
CREATE TABLE IF NOT EXISTS _migrations ( CREATE TABLE IF NOT EXISTS _migrations (
id CHAR(8) PRIMARY KEY DEFAULT encode(gen_random_bytes(4), 'hex'), id CHAR(8) PRIMARY KEY,
name VARCHAR(80) NULL UNIQUE, name VARCHAR(80) NULL UNIQUE,
applied_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP applied_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
); );
-- note: to enable text-based tools to grep and sort we put 'name' before 'id' -- note: to enable text-based tools to grep and sort we put 'name' before 'id'