mirror of
https://github.com/andwati/url-shortener.git
synced 2026-10-23 04:42:16 +00:00
added htmx, picocss postgres
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user