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
All checks were successful
Deploy to production / deploy (push) Successful in 2m56s
This commit is contained in:
0
backend/migrations/20260112000000-add-indexes-for-director-proposals-rollback.sql
Normal file → Executable file
0
backend/migrations/20260112000000-add-indexes-for-director-proposals-rollback.sql
Normal file → Executable file
0
backend/migrations/20260112000000-add-indexes-for-director-proposals.sql
Normal file → Executable file
0
backend/migrations/20260112000000-add-indexes-for-director-proposals.sql
Normal file → Executable file
16
backend/migrations/20260716000000-create-user-block.sql
Normal file
16
backend/migrations/20260716000000-create-user-block.sql
Normal 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;
|
||||
@@ -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
0
backend/migrations/README.md
Normal file → Executable file
0
backend/migrations/add_chat_room_dialog_fields.sql
Normal file → Executable file
0
backend/migrations/add_chat_room_dialog_fields.sql
Normal file → Executable file
0
backend/migrations/add_condition_to_vehicle.sql
Normal file → Executable file
0
backend/migrations/add_condition_to_vehicle.sql
Normal file → Executable file
0
backend/migrations/add_is_heir_to_child_relation.sql
Normal file → Executable file
0
backend/migrations/add_is_heir_to_child_relation.sql
Normal file → Executable file
0
backend/migrations/make_transport_product_nullable.sql
Normal file → Executable file
0
backend/migrations/make_transport_product_nullable.sql
Normal file → Executable file
0
backend/migrations/migrations/2023xxxxxx-change-email-to-bytea.js
Normal file → Executable file
0
backend/migrations/migrations/2023xxxxxx-change-email-to-bytea.js
Normal file → Executable file
Reference in New Issue
Block a user