mirror of https://github.com/sveltejs/svelte
parent
2eacc359a4
commit
e8adc9c0ab
@ -1,6 +1,8 @@
|
||||
NODE_ENV=
|
||||
|
||||
PORT=
|
||||
BASEURL=
|
||||
DATABASE_URL=
|
||||
GITHUB_CLIENT_ID=
|
||||
GITHUB_CLIENT_SECRET=
|
||||
MAPBOX_ACCESS_TOKEN=
|
||||
|
@ -0,0 +1,23 @@
|
||||
exports.up = DB => {
|
||||
DB.sql(`
|
||||
create table if not exists users (
|
||||
id serial primary key,
|
||||
uid character varying(255) not null unique,
|
||||
name character varying(255),
|
||||
username character varying(255) not null,
|
||||
avatar text,
|
||||
token character varying(255) not null
|
||||
);
|
||||
|
||||
create unique index if not exists users_pkey ON users(id int4_ops);
|
||||
create unique index if not exists users_uid_key ON users(uid text_ops);
|
||||
`);
|
||||
};
|
||||
|
||||
exports.down = DB => {
|
||||
DB.sql(`
|
||||
drop table if exists users cascade;
|
||||
drop index if exists users_uid_key;
|
||||
drop index if exists users_pkey;
|
||||
`);
|
||||
};
|
Loading…
Reference in new issue