Some checks failed
Build MIPS Binary / build (push) Has been cancelled
- Add sqlx migration system with migrations/ directory - Create 001_init.sql and 002_push_subscriptions.sql migration files - Move from manual CREATE TABLE to version-controlled migrations - Add push_subscriptions table with DB persistence - PushSubscriptionStore now loads from DB on startup - Add save/remove/get methods for push subscriptions in db.rs - Move VAPID keys to .env file (with fallback to hardcoded values) - Delete old vibetorrent.db and recreate with migrations
14 lines
435 B
SQL
14 lines
435 B
SQL
-- 002_push_subscriptions.sql
|
|
-- Push notification subscriptions storage
|
|
|
|
CREATE TABLE IF NOT EXISTS push_subscriptions (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
endpoint TEXT NOT NULL UNIQUE,
|
|
p256dh TEXT NOT NULL,
|
|
auth TEXT NOT NULL,
|
|
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
|
);
|
|
|
|
-- Index for faster lookups by endpoint
|
|
CREATE INDEX IF NOT EXISTS idx_push_subscriptions_endpoint ON push_subscriptions(endpoint);
|