mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-01-02 10:58:10 -05:00
21 lines
693 B
SQL
21 lines
693 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;
|
|
|
|
|
|
|
|
-- Policies
|
|
DROP POLICY IF EXISTS "public read" ON private_user_message_channels;
|
|
CREATE POLICY "public read" ON private_user_message_channels
|
|
FOR SELECT USING (true);
|
|
|
|
-- Indexes
|
|
-- Removed redundant primary key index creation because PRIMARY KEY already creates a unique index on id
|