UPDATE: Submission module
All checks were successful
Build and Release / release (push) Successful in 1m14s

This commit is contained in:
2026-05-04 09:55:17 +07:00
parent f3f2e09fd5
commit bcc2e192c1
48 changed files with 2918 additions and 359 deletions

View File

@@ -0,0 +1,28 @@
CREATE TABLE IF NOT EXISTS projects (
id UUID PRIMARY KEY DEFAULT uuidv7(),
title TEXT NOT NULL,
description TEXT,
latest_commit_id UUID,
project_status SMALLINT NOT NULL DEFAULT 1,
locked_by UUID,
is_deleted BOOLEAN NOT NULL DEFAULT false,
user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
CREATE INDEX idx_projects_latest_commit_id
ON projects (latest_commit_id);
CREATE INDEX idx_projects_user_status_updated
ON projects (user_id, project_status, updated_at DESC);
CREATE INDEX idx_projects_status_updated
ON projects (project_status, updated_at DESC);
CREATE INDEX idx_projects_title_trgm
ON projects USING GIN (title gin_trgm_ops);