modified: seed.sql

This commit is contained in:
Acid
2026-06-04 23:57:32 -04:00
parent 6f54924a1f
commit affe71d6dd
4 changed files with 15 additions and 27 deletions
+4 -1
View File
@@ -2,4 +2,7 @@ module acidburnmonkey/acidarchon
go 1.26.2
require github.com/joho/godotenv v1.5.1 // indirect
require (
github.com/joho/godotenv v1.5.1 // indirect
github.com/mattn/go-sqlite3 v1.14.44 // indirect
)
+2
View File
@@ -1,2 +1,4 @@
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/mattn/go-sqlite3 v1.14.44 h1:3VSe+xafpbzsLbdr2AWlAZk9yRHiBhTBakioXaCKTF8=
github.com/mattn/go-sqlite3 v1.14.44/go.mod h1:pjEuOr8IwzLJP2MfGeTb0A35jauH+C2kbHKBr7yXKVQ=
+1
View File
@@ -11,6 +11,7 @@ import (
"text/template"
"github.com/joho/godotenv"
_ "github.com/mattn/go-sqlite3"
)
type ipResponse struct {
+7 -25
View File
@@ -1,26 +1,8 @@
--@BLOCK
-- Levels table (lookup/reference table)
CREATE TABLE levels (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL
);
-- Insert the 4 level types
INSERT INTO levels (name) VALUES
('debug'),
('info'),
('warning'),
('error');
-- Create table
CREATE TABLE logs(
id SERIAL PRIMARY KEY,
level_id VARCHAR(255) NOT NULL,
ip VARCHAR(255),
date timestamp,
repeating INT,
FOREIGN KEY (level_id) REFERENCES levels(id)
CREATE TABLE IF NOT EXISTS logs (
id INTEGER PRIMARY KEY AUTOINCREMENT,
level TEXT NOT NULL CHECK(level IN ('debug', 'info', 'warning', 'error')),
ip TEXT,
traceback TEXT,
date DATETIME,
repeating INTEGER
);