Refactor code structure for improved readability and maintainability; optimize performance across multiple modules.
All checks were successful
Deploy to production / deploy (push) Successful in 2m56s

This commit is contained in:
Torsten Schulz (local)
2026-07-21 09:08:15 +02:00
parent 75b52de282
commit 1ab9407e79
1400 changed files with 22278 additions and 485 deletions

View File

@@ -0,0 +1,24 @@
CREATE TABLE IF NOT EXISTS community.push_notification_device (
id BIGSERIAL PRIMARY KEY,
user_id INTEGER NOT NULL REFERENCES community."user"(id) ON DELETE CASCADE,
token TEXT NOT NULL UNIQUE,
platform VARCHAR(20) NOT NULL DEFAULT 'android',
enabled BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
CONSTRAINT push_notification_device_platform_check CHECK (platform IN ('android'))
);
CREATE INDEX IF NOT EXISTS push_notification_device_user_enabled_idx
ON community.push_notification_device (user_id, enabled);
CREATE TABLE IF NOT EXISTS community.push_notification_setting (
user_id INTEGER PRIMARY KEY REFERENCES community."user"(id) ON DELETE CASCADE,
enabled BOOLEAN NOT NULL DEFAULT FALSE,
chat_enabled BOOLEAN NOT NULL DEFAULT TRUE,
friend_login_enabled BOOLEAN NOT NULL DEFAULT TRUE,
falukant_enabled BOOLEAN NOT NULL DEFAULT TRUE,
vocab_reminder_enabled BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);