mirror of
https://github.com/n08i40k/schedule-parser-rusted.git
synced 2025-12-06 17:57:47 +03:00
Подключение к Postgres и тестовый эндпоинт авторизации
This commit is contained in:
1
migrations/2025-03-21-212723_create_fcm/down.sql
Normal file
1
migrations/2025-03-21-212723_create_fcm/down.sql
Normal file
@@ -0,0 +1 @@
|
||||
DROP TABLE fcm;
|
||||
11
migrations/2025-03-21-212723_create_fcm/up.sql
Normal file
11
migrations/2025-03-21-212723_create_fcm/up.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
CREATE TABLE fcm
|
||||
(
|
||||
user_id text PRIMARY KEY NOT NULL,
|
||||
token text NOT NULL,
|
||||
topics text[] NULL
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX fcm_user_id_key ON fcm USING btree (user_id);
|
||||
|
||||
ALTER TABLE fcm
|
||||
ADD CONSTRAINT fcm_user_id_fkey FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
Reference in New Issue
Block a user