From fc9a4ea22eb91757b95cbe1bf1708be17fc2337a Mon Sep 17 00:00:00 2001 From: yo momma Date: Tue, 27 Jan 2026 03:33:16 +0000 Subject: Fix HTTPS/mixed content; make config env-driven - Replace hardcoded dump.fm URLs with host/scheme config\n- Add optional passwordless login flow\n- Update templates/static assets to avoid blocked HTTP resources\n- Ignore local uploads/SQL dumps --- db/0-create.psql | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'db/0-create.psql') diff --git a/db/0-create.psql b/db/0-create.psql index 762bc3a..9a9b771 100755 --- a/db/0-create.psql +++ b/db/0-create.psql @@ -1,4 +1,8 @@ -CREATE DATABASE dumpfm; +-- dump.fm schema +-- +-- Run with: +-- createdb dumpfm +-- psql -d dumpfm -f db/0-create.psql CREATE TABLE users ( user_id SERIAL PRIMARY KEY, @@ -17,9 +21,8 @@ CREATE TABLE users ( profile_bg text ); -ALTER TABLE users ADD CONSTRAINT users_nick_constraint UNIQUE (LOWER(nick)); - -CREATE INDEX users_nick_lowercase_idx ON users (lower(nick)); +-- Case-insensitive uniqueness for nicks. +CREATE UNIQUE INDEX users_nick_lowercase_uidx ON users (lower(nick)); CREATE TABLE rooms ( room_id SERIAL PRIMARY KEY, @@ -147,7 +150,7 @@ CREATE TABLE direct_messages ( -- dont add this yet CREATE TABLE avatars ( avatar_id SERIAL PRIMARY KEY, - user_id NOT NULL REFERENCES users, + user_id integer NOT NULL REFERENCES users, created_on timestamp NOT NULL DEFAULT now(), type text, url text, @@ -160,6 +163,5 @@ CREATE TABLE avatars ( -- dont add this yet CREATE TABLE images ( - image_id SERIAL PRIMARY KEY, - + image_id SERIAL PRIMARY KEY ); -- cgit v1.2.3-70-g09d2