aboutsummaryrefslogtreecommitdiff
path: root/create_db.sql
diff options
context:
space:
mode:
Diffstat (limited to 'create_db.sql')
-rw-r--r--create_db.sql14
1 files changed, 14 insertions, 0 deletions
diff --git a/create_db.sql b/create_db.sql
new file mode 100644
index 0000000..c7c2d5c
--- /dev/null
+++ b/create_db.sql
@@ -0,0 +1,14 @@
+CREATE TABLE connection (
+ id serial PRIMARY KEY,
+ ip inet,
+ port INT,
+ timestamp TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP
+);
+
+CREATE TABLE login_attempt (
+ id serial PRIMARY KEY,
+ username text NOT NULL,
+ password text NOT NULL,
+ connection int references connection(id),
+ timestamp TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP
+);