سامانه صدور فاکتور و حسابداری

fix: preserve D1 bootstrap organization compatibility

davoodmehraban89 committed Oct 1, 2026 at 23:19 UTC cba9fec2be2b469d4ccfa8bea9a260b8c0ee73e5
1 file changed +1 -1
supabase/tests/request_d1_bootstrap.sql
+1 -1
@@ -6,7 +6,7 @@ do $$ begin if not exists(select 1 from pg_roles where rolname='anon') then crea
6 grant usage on schema public,private,auth to authenticated;
7 grant usage on schema public to anon;
8 create table if not exists public.profiles(id uuid primary key,email text,full_name text);
9 -create table if not exists public.organizations(id uuid primary key,owner_user_id uuid not null references public.profiles(id),name text not null,status text not null default 'active');
9 +create table if not exists public.organizations(id uuid primary key,owner_user_id uuid not null references public.profiles(id),name text not null default 'Test Org',status text not null default 'active');
10 create table if not exists public.licenses(id uuid primary key default gen_random_uuid(),organization_id uuid not null references public.organizations(id),user_id uuid not null references public.profiles(id),plan text not null default 'lifetime',status text not null default 'active',modules text[] not null default array['requests_workflow']::text[],ends_at date);
11 create table if not exists public.organization_members(id uuid primary key default gen_random_uuid(),organization_id uuid not null references public.organizations(id),user_id uuid not null references public.profiles(id),status text not null default 'active',is_owner boolean not null default false,position_title text,created_at timestamptz not null default now(),unique(organization_id,user_id));
12 create table if not exists public.member_module_permissions(id uuid primary key default gen_random_uuid(),organization_id uuid not null references public.organizations(id),member_id uuid not null references public.organization_members(id),module_key text not null,capabilities text[] not null default array['read']::text[]);