From 96f9ab2d309e0c1cc4e4636ab3d52d94d4bffa2c Mon Sep 17 00:00:00 2001 From: swag Date: Wed, 12 Jan 2022 17:05:36 -0500 Subject: [PATCH] Begin visitor counter stuff --- migrations/8/down.sql | 1 + migrations/8/up.sql | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 migrations/8/down.sql create mode 100644 migrations/8/up.sql diff --git a/migrations/8/down.sql b/migrations/8/down.sql new file mode 100644 index 0000000..622e432 --- /dev/null +++ b/migrations/8/down.sql @@ -0,0 +1 @@ +DROP TABLE counters; diff --git a/migrations/8/up.sql b/migrations/8/up.sql new file mode 100644 index 0000000..c4badc0 --- /dev/null +++ b/migrations/8/up.sql @@ -0,0 +1,9 @@ +CREATE TABLE IF NOT EXISTS counters ( + counter_id SERIAL PRIMARY KEY, + counter_name VARCHAR(64), + counter_value INTEGER, + counter_date TIMESTAMPTZ SET DEFAULT NOW() +); + +INSERT INTO counters (counter_name, counter_value) +VALUES ('visitor', 1337);