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,16 @@
seiteBEGIN;
CREATE TABLE IF NOT EXISTS community.user_block (
id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
blocker_id INTEGER NOT NULL REFERENCES community."user"(id) ON DELETE CASCADE,
blocked_id INTEGER NOT NULL REFERENCES community."user"(id) ON DELETE CASCADE,
created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT user_block_not_self CHECK (blocker_id <> blocked_id),
CONSTRAINT user_block_unique UNIQUE (blocker_id, blocked_id)
);
CREATE INDEX IF NOT EXISTS user_block_blocker_id_idx
ON community.user_block (blocker_id);
COMMIT;

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()
);

0
backend/migrations/README.md Normal file → Executable file
View File

0
backend/migrations/add_chat_room_dialog_fields.sql Normal file → Executable file
View File

0
backend/migrations/add_condition_to_vehicle.sql Normal file → Executable file
View File

0
backend/migrations/add_is_heir_to_child_relation.sql Normal file → Executable file
View File

0
backend/migrations/make_transport_product_nullable.sql Normal file → Executable file
View File

View File