aboutsummaryrefslogtreecommitdiffstats
path: root/postgres/init.sql
diff options
context:
space:
mode:
Diffstat (limited to 'postgres/init.sql')
-rw-r--r--postgres/init.sql34
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
+);