Mars_DB
Tables (8)
alembic_version
- version_num — character varying(32) — Primary key — NOT NULL
attachments
- attachment_id — uuid — Primary key — NOT NULL
- message_id — uuid — Foreign key → messages.message_id — NOT NULL
- name — character varying(500) — NOT NULL
- content_type — character varying(100) — NOT NULL
- size — integer — NOT NULL
- data — bytea — NOT NULL
- created_at — timestamp with time zone — NOT NULL
documents
- document_id — uuid — Primary key — NOT NULL
- user_id — uuid — Foreign key → users.user_id
- project_id — uuid — Foreign key → projects.project_id
- name — character varying(500) — NOT NULL
- domain — character varying(50) — NOT NULL
- department — character varying(100)
- visibility — public.visibilityenum — NOT NULL
- content_type — character varying(100) — NOT NULL
- size — integer — NOT NULL
- data — bytea — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- status — character varying(20) — NOT NULL
- job_id — character varying(64)
- chunks_indexed — integer
- error — text
- updated_at — timestamp with time zone — NOT NULL
messages
- message_id — uuid — Primary key — NOT NULL
- session_id — uuid — Foreign key → sessions.session_id — NOT NULL
- role — public.roleenum — NOT NULL
- content — text — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- domain — character varying(50)
projects (Untitled)
- project_id — uuid — Primary key — NOT NULL
- user_id — uuid — Foreign key → users.user_id — NOT NULL
- name — character varying(255)
- created_at — timestamp with time zone
- updated_at — timestamp with time zone
- instruction — text
- is_favorite — boolean
sessions
- session_id — uuid — Primary key — NOT NULL
- user_id — uuid — Foreign key → users.user_id — NOT NULL
- project_id — uuid — Foreign key → projects.project_id
- title — character varying(255) — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
- is_favorite — boolean — NOT NULL
sources
- source_id — uuid — Primary key — NOT NULL
- message_id — uuid — Foreign key → messages.message_id — NOT NULL
- name — character varying(500) — NOT NULL
- page — character varying(50)
- created_at — timestamp with time zone — NOT NULL
users
- user_id — uuid — Primary key — NOT NULL
- email — character varying(255) — NOT NULL
- password — character varying(255) — NOT NULL
- created_at — timestamp with time zone — NOT NULL
- updated_at — timestamp with time zone — NOT NULL
- refresh_token — character varying(512)
- role — public.userrole — NOT NULL
- status — public.approvalstatus — NOT NULL
- name — character varying(100) — NOT NULL