Merge commit '46171b4f24f2ddc3b9212b9ad6769925bcaceb03' into feature/site-features-and-mockup

# Conflicts:
#	.env.example
#	solution/backend/common/enums.py
#	solution/backend/requirements.txt
#	solution/backend/services/site_payload.py
#	solution/backend/services/snapshot.py
#	solution/backend/services/weather_notes.json
#	solution/shared/src/types/site-payload.ts
#	solution/site/src/layouts/editorial/Shell.tsx
#	solution/site/src/lib/use-live-weather.ts
#	solution/site/src/pages/HomePage.tsx
#	solution/site/src/sections/SiteFooter.tsx
#	solution/site/src/sections/WeatherSection.tsx
#	solution/site/src/sections/index.ts
This commit is contained in:
minaChoi committed 2026-09-18 09:44:10 +09:00
commit b78486b845
74 files changed
+3266 -193

No files matched your search

+50
View File
@@ -601,3 +601,53 @@ INSERT INTO public.schema_migrations (version) VALUES
('0008_personalization_to_site_sections'),
('0009_align_with_init_sql')
ON CONFLICT (version) DO NOTHING;
-- SNS: credentials and approval records never enter public payloads.
CREATE TABLE IF NOT EXISTS public.owner_social_accounts (
account_id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
user_id uuid NOT NULL,
provider smallint NOT NULL CHECK (provider IN (1,2)),
provider_user_id varchar(200) NOT NULL,
handle varchar(200) NOT NULL,
profile_url text NOT NULL,
access_token text,
refresh_token text,
access_expires_at timestamptz,
scopes jsonb NOT NULL DEFAULT '[]',
status varchar(20) NOT NULL DEFAULT 'linked',
last_error text,
created_at timestamptz NOT NULL DEFAULT now(),
updated_at timestamptz NOT NULL DEFAULT now(),
deleted boolean NOT NULL DEFAULT false
);
CREATE UNIQUE INDEX IF NOT EXISTS uq_social_account ON public.owner_social_accounts(user_id, provider) WHERE deleted=false AND status IN ('linked','needs_reauth');
-- SNS: credentials and approval records never enter public payloads.
CREATE TABLE IF NOT EXISTS public.place_social_posts (
post_id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
place_id uuid NOT NULL,
user_id uuid NOT NULL,
site_version_id uuid NOT NULL,
account_id uuid,
provider smallint NOT NULL CHECK (provider IN (1,2)),
body text NOT NULL DEFAULT '',
link_url text NOT NULL,
grounded_facts jsonb NOT NULL DEFAULT '[]',
status varchar(24) NOT NULL DEFAULT 'DRAFTING',
approval_token_sha varchar(64),
approval_sent_at timestamptz,
approval_channel varchar(20),
approval_expires_at timestamptz,
decided_at timestamptz,
decided_via varchar(20),
provider_post_id varchar(200),
permalink text,
posted_at timestamptz,
last_error text,
created_at timestamptz NOT NULL DEFAULT now(),
updated_at timestamptz NOT NULL DEFAULT now(),
deleted boolean NOT NULL DEFAULT false
);
-- 게시 성공 뒤의 이중 클릭도 막는다. 같은 버전은 기존 초안을 재사용한다.
CREATE UNIQUE INDEX IF NOT EXISTS uq_social_version ON public.place_social_posts(place_id, site_version_id) WHERE deleted=false;
CREATE INDEX IF NOT EXISTS idx_social_posted ON public.place_social_posts(place_id, posted_at DESC) WHERE deleted=false AND status='POSTED';
@@ -0,0 +1,19 @@
-- SNS: credentials and approval records never enter public payloads.
CREATE TABLE IF NOT EXISTS public.owner_social_accounts (
account_id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
user_id uuid NOT NULL,
provider smallint NOT NULL CHECK (provider IN (1,2)),
provider_user_id varchar(200) NOT NULL,
handle varchar(200) NOT NULL,
profile_url text NOT NULL,
access_token text,
refresh_token text,
access_expires_at timestamptz,
scopes jsonb NOT NULL DEFAULT '[]',
status varchar(20) NOT NULL DEFAULT 'linked',
last_error text,
created_at timestamptz NOT NULL DEFAULT now(),
updated_at timestamptz NOT NULL DEFAULT now(),
deleted boolean NOT NULL DEFAULT false
);
CREATE UNIQUE INDEX IF NOT EXISTS uq_social_account ON public.owner_social_accounts(user_id, provider) WHERE deleted=false AND status IN ('linked','needs_reauth');
@@ -0,0 +1,29 @@
-- SNS: credentials and approval records never enter public payloads.
CREATE TABLE IF NOT EXISTS public.place_social_posts (
post_id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
place_id uuid NOT NULL,
user_id uuid NOT NULL,
site_version_id uuid NOT NULL,
account_id uuid,
provider smallint NOT NULL CHECK (provider IN (1,2)),
body text NOT NULL DEFAULT '',
link_url text NOT NULL,
grounded_facts jsonb NOT NULL DEFAULT '[]',
status varchar(24) NOT NULL DEFAULT 'DRAFTING',
approval_token_sha varchar(64),
approval_sent_at timestamptz,
approval_channel varchar(20),
approval_expires_at timestamptz,
decided_at timestamptz,
decided_via varchar(20),
provider_post_id varchar(200),
permalink text,
posted_at timestamptz,
last_error text,
created_at timestamptz NOT NULL DEFAULT now(),
updated_at timestamptz NOT NULL DEFAULT now(),
deleted boolean NOT NULL DEFAULT false
);
-- 게시 성공 뒤의 이중 클릭도 막는다. 같은 버전은 기존 초안을 재사용한다.
CREATE UNIQUE INDEX IF NOT EXISTS uq_social_version ON public.place_social_posts(place_id, site_version_id) WHERE deleted=false;
CREATE INDEX IF NOT EXISTS idx_social_posted ON public.place_social_posts(place_id, posted_at DESC) WHERE deleted=false AND status='POSTED';