Move all tables into a schema
All checks were successful
Build and Push Docker Image / build (push) Successful in 7m19s

This commit is contained in:
2026-06-03 00:02:43 +02:00
parent ec4159e84c
commit 6d693db605
7 changed files with 38 additions and 36 deletions

View File

@@ -1,5 +1,7 @@
-- +goose Up
CREATE TABLE urls (
CREATE SCHEMA IF NOT EXISTS lss;
CREATE TABLE lss.urls (
url_id SERIAL PRIMARY KEY,
long_url TEXT NOT NULL,
short_code VARCHAR(10) UNIQUE NOT NULL,
@@ -9,8 +11,8 @@ CREATE TABLE urls (
);
-- Crucial index for lightning-fast lookups when redirecting
CREATE INDEX idx_urls_short_code ON urls(short_code);
CREATE INDEX idx_urls_short_code ON lss.urls(short_code);
-- +goose Down
DROP INDEX idx_urls_short_code;
DROP TABLE urls;
DROP TABLE lss.urls;