mirror of
https://github.com/therootcompany/golib.git
synced 2026-03-29 03:24:07 +00:00
fix(sql-migrate): use portable SQL in _migrations table (closes #37)
This commit is contained in:
parent
a854fef67e
commit
4895012d67
@ -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'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user