added htmx, picocss postgres

This commit is contained in:
2025-03-12 16:01:07 +03:00
parent f8472a0308
commit 74af30ef57
8 changed files with 151 additions and 1 deletions
+13
View File
@@ -0,0 +1,13 @@
CREATE DATABASE urlshortener;
\c urlshortener
CREATE TABLE IF NOT EXISTS urls(
id SERIAL PRIMARY KEY,
original_url TEXT NOT NULL,
short_code VARCHAR(10) UNIQUE NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
visits INTEGER DEFAULT 0
);
CREATE INDEX IF NOT EXISTS idx_short_code ON urls(short_code)