create table gym_sessions (
id bigint primary key generated always as identity,
user_id uuid references auth.users (id) on delete cascade not null,
session_date timestamp with time zone default timezone('ist'::text, now()) not null,
deleted_at timestamp with time zone,
inserted_at timestamp with time zone default timezone('ist'::text, now()) not null,
updated_at timestamp with time zone default timezone('ist'::text, now()) not null
);
alter table public.gym_sessions enable row level security;
CREATE POLICY store_gym_session
ON gym_sessions
FOR SELECT
USING (auth.uid() = user_id);