28 lines
642 B
Go
28 lines
642 B
Go
// Code generated by go generate; DO NOT EDIT.
|
|
|
|
package storage
|
|
|
|
var SqlMap = map[string]string{
|
|
"schema_version_1": `-- create schema version table
|
|
create table schema_version (
|
|
version text not null
|
|
);
|
|
|
|
-- create users table
|
|
create table users
|
|
(
|
|
name text primary key CHECK (name <> ''),
|
|
hash text not null CHECK (hash <> ''),
|
|
created_at timestamp with time zone DEFAULT now()
|
|
);
|
|
|
|
-- create posts status
|
|
create table statuses
|
|
(
|
|
id serial primary key,
|
|
author TEXT references users(name) NOT NULL,
|
|
content VARCHAR(500) NOT NULL CHECK (content <> ''),
|
|
created_at timestamp with time zone DEFAULT now()
|
|
);
|
|
`,
|
|
}
|