diff options
author | 2020-10-06 21:29:34 +0200 | |
---|---|---|
committer | 2020-10-06 21:58:57 +0200 | |
commit | c8c6cb8754bd0917e35eb157925028a9b6f1dcb9 (patch) | |
tree | 7da1d95e76a21eca127b1239ed4f4e042d272da4 /postgres | |
parent | Merge pull request #402 from python-discord/joseph/reduce-discord-scopes (diff) |
Added metricity db connection and user bot API
Diffstat (limited to 'postgres')
-rw-r--r-- | postgres/init.sql | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/postgres/init.sql b/postgres/init.sql new file mode 100644 index 00000000..fd29ddbc --- /dev/null +++ b/postgres/init.sql @@ -0,0 +1,34 @@ +CREATE DATABASE metricity; + +\c metricity; + +CREATE TABLE users ( + id varchar(255), + name varchar(255) not null, + avatar_hash varchar(255), + joined_at timestamp not null, + created_at timestamp not null, + is_staff boolean not null, + opt_out boolean default false, + bot boolean default false, + is_guild boolean default true, + is_verified boolean default false, + public_flags text default '{}', + verified_at timestamp, + primary key(id) +); + +INSERT INTO users VALUES ( + 0, + 'foo', + 'bar', + current_timestamp, + current_timestamp, + false, + false, + false, + true, + false, + '{}', + NULL +); |