aboutsummaryrefslogtreecommitdiff
path: root/create_db.sql
blob: c7c2d5c9720b0bdde8d911267d5ed1e2bec6d5ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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
);