diff options
| author | user <user@node5.net> | 2024-03-21 23:05:08 +0100 |
|---|---|---|
| committer | user <user@node5.net> | 2024-03-21 23:05:08 +0100 |
| commit | 65302bf60206ea43213e7f2bc18adf15838cf3a2 (patch) | |
| tree | a2d7249460790c816aa71d595a8863f1f6281950 /create_db.sql | |
initial commit, logs login attempts to DB
Diffstat (limited to 'create_db.sql')
| -rw-r--r-- | create_db.sql | 14 |
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 +); |
