Feature: user upload artwork

This commit is contained in:
2025-10-25 02:22:39 -04:00
parent 28d0443f44
commit deb163bd70
23 changed files with 1288 additions and 177 deletions

View File

@@ -27,3 +27,20 @@ CREATE TRIGGER update_users_updated_at
BEFORE UPDATE ON "public"."Users"
FOR EACH ROW
EXECUTE FUNCTION update_updated_at_column();
-- 5. Define the Artworks table
CREATE TABLE "public"."Artworks" (
"id" UUID PRIMARY KEY DEFAULT gen_random_uuid(),
"title" CITEXT UNIQUE NOT NULL,
"filename" TEXT NOT NULL,
"mimetype" TEXT NOT NULL,
"size" INTEGER NOT NULL,
"created_at" TIMESTAMPTZ NOT NULL DEFAULT NOW(),
"updated_at" TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
-- 6. Create the trigger and attach it to the Artworks table
CREATE TRIGGER update_artworks_updated_at
BEFORE UPDATE ON "public"."Artworks"
FOR EACH ROW
EXECUTE FUNCTION update_updated_at_column();