This repository has been archived on 2025-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
bactdb/datastore/migrations/00001_AddUsers_up.sql
Matthew Dillon 8fa594e3f0 DB Migrations
Replacing modl’s built-in table creation and removal
with manual migrations. Thanks to @DavidHuie for
gomigrate!
2014-10-06 17:09:41 -08:00

19 lines
393 B
SQL

-- bactdb
-- Matthew R Dillon
CREATE TABLE users (
id BIGSERIAL NOT NULL,
username CHARACTER VARYING(100),
createdat TIMESTAMP WITH TIME ZONE,
updatedat TIMESTAMP WITH TIME ZONE,
deletedat TIMESTAMP WITH TIME ZONE,
CONSTRAINT users_pkey PRIMARY KEY (id)
);
CREATE UNIQUE INDEX username_idx
ON users
USING btree
(username COLLATE pg_catalog."default");