File size: 994 Bytes
45b5225
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-- Jalankan script ini di SQL Editor Supabase Tuan
-- 1. Buat Tabel
create table if not exists "public"."YanzzNime" (
    id text primary key,          -- ID dari AnimeIn (misal: "5948")
    title text,                   -- Judul Anime
    poster text,                  -- URL Poster
    info jsonb,                   -- Info lengkap (Synopsis, Genre, Status, Stream Links)
    created_at timestamp with time zone default timezone('utc'::text, now())
);

-- 2. Aktifkan RLS (Opsional tapi disarankan)
alter table "public"."YanzzNime" enable row level security;

-- 3. Kebijakan INSERT/UPDATE (PENTING AGAR SCRIPT BISA TULIS DATA)
-- Karena Tuan pakai Anon Key, kita buka akses insert/update untuk public (anon)
create policy "Enable insert for everyone" on "public"."YanzzNime"
for insert with check (true);

create policy "Enable update for everyone" on "public"."YanzzNime"
for update using (true);

create policy "Enable select for everyone" on "public"."YanzzNime"
for select using (true);