Spaces:
Sleeping
Sleeping
Download backend/sql/017_kakao_notify.sql from stylevoice/talk: direct link, hf CLI and curl.
- Browser
- Download file 1.36 kB
-
https://huggingface.co/spaces/stylevoice/talk/resolve/main/backend/sql/017_kakao_notify.sql
- Command line
-
hf download hf://spaces/stylevoice/talk/backend/sql/017_kakao_notify.sql
-
curl -L -o 017_kakao_notify.sql https://huggingface.co/spaces/stylevoice/talk/resolve/main/backend/sql/017_kakao_notify.sql
1.36 kB
| -- 017: ์๋ฆผ ์ฑ๋ ์ ํ โ PC ํฌ๋กฌ ํธ์ โ ์นด์นด์ค ์๋ฆผํก + SMS fallback | |
| -- | |
| -- ๋ณ๊ฒฝ ์ด์ : | |
| -- ๋ธ๋ผ์ฐ์ ์ข ๋ฃ(Cmd+Q) ์ ํฌ๋กฌ ํธ์๋ ๋๋ฌ ๋ชป ํจ. ์นด์นด์ค ์๋ฆผํก + SMS fallback ์ผ๋ก | |
| -- OS/๋ธ๋ผ์ฐ์ ์ํ ๋ฌด๊ด 100% ๋๋ฌ. notify_push ์ปฌ๋ผ์ notify_kakao ๋ก ์๋ฏธ ๋ณ๊ฒฝ. | |
| -- | |
| -- ์ด์ ์ ์ฉ ์์: | |
| -- 1) ์ฝ๋ ๋ฐฐํฌ (notify_kakao ๋ง ์ฌ์ฉ) โ 2) ๋ณธ SQL ์ ์ฉ โ 3) push_subscriptions ์๊ตฌ ์ ๊ฑฐ | |
| -- | |
| -- ์ ์ฉ ์ผ์: 2026-05-05 ์ ๋ | |
| -- 1) playlist_schedules: notify_push โ notify_kakao ์ปฌ๋ผ rename | |
| ALTER TABLE playlist_schedules | |
| ADD COLUMN IF NOT EXISTS notify_kakao BOOLEAN NOT NULL DEFAULT TRUE; | |
| -- ๊ธฐ์กด notify_push ๊ฐ ๋ง์ด๊ทธ๋ ์ด์ (์ปฌ๋ผ ์กด์ฌ ์์๋ง) | |
| DO $$ | |
| BEGIN | |
| IF EXISTS ( | |
| SELECT 1 FROM information_schema.columns | |
| WHERE table_name = 'playlist_schedules' AND column_name = 'notify_push' | |
| ) THEN | |
| EXECUTE 'UPDATE playlist_schedules | |
| SET notify_kakao = COALESCE(notify_push, TRUE) | |
| WHERE notify_kakao IS NULL OR notify_kakao = TRUE'; | |
| EXECUTE 'ALTER TABLE playlist_schedules DROP COLUMN notify_push'; | |
| END IF; | |
| END $$; | |
| -- 2) push_subscriptions ํ ์ด๋ธ ์ ๊ฑฐ (Web Push ์ฑ๋ ์๊ตฌ ํ๊ธฐ) | |
| DROP TABLE IF EXISTS push_subscriptions; | |
| -- 3) push_tokens (legacy FCM) ๋ ์๋ค๋ฉด ์ ๋ฆฌ | |
| DROP TABLE IF EXISTS push_tokens; | |