Files
Compass/backend/supabase/private_user_message_channels.sql
MartinBraquet 799cca3c03 Add getChannelsCount API endpoint to retrieve total message channel count
- Implemented `getChannelsCount` function in the backend for querying channel count.
- Added public `get-channels-count` schema definition with related metadata.
- Integrated the new endpoint into client-side user utilities for specific table reads.
- Adjusted documentation for migration process consistency.
2026-07-23 15:01:38 +02:00

16 lines
574 B
SQL

CREATE TABLE IF NOT EXISTS private_user_message_channels
(
created_time TIMESTAMPTZ DEFAULT now() NOT NULL,
id BIGINT GENERATED ALWAYS AS IDENTITY NOT NULL,
last_updated_time TIMESTAMPTZ DEFAULT now() NOT NULL,
title TEXT,
CONSTRAINT private_user_message_channels_pkey PRIMARY KEY (id)
);
-- Row Level Security
ALTER TABLE private_user_message_channels
ENABLE ROW LEVEL SECURITY;
-- Indexes
-- Removed redundant primary key index creation because PRIMARY KEY already creates a unique index on id