i think i added push notifications to backend but im going to sleep now and ill finish frontend later
This commit is contained in:
@@ -55,6 +55,32 @@ CREATE TABLE IF NOT EXISTS public.users
|
||||
CONSTRAINT unique_email UNIQUE (email)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS public.device_tokens
|
||||
(
|
||||
id uuid NOT NULL DEFAULT uuid_generate_v4(),
|
||||
user_id uuid NOT NULL,
|
||||
fcm_token text NOT NULL,
|
||||
updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
CONSTRAINT device_tokens_pkey PRIMARY KEY (id),
|
||||
|
||||
CONSTRAINT fk_device_tokens_user
|
||||
FOREIGN KEY (user_id)
|
||||
REFERENCES public.users(id)
|
||||
ON DELETE CASCADE,
|
||||
|
||||
CONSTRAINT uq_device_tokens_fcm_token
|
||||
UNIQUE (fcm_token)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_device_tokens_user_id
|
||||
ON public.device_tokens(user_id);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ALTER TABLE IF EXISTS public.alt_subject
|
||||
ADD CONSTRAINT alt_subject_subject_id_fkey FOREIGN KEY (subject_id)
|
||||
REFERENCES public.subjects (id) MATCH SIMPLE
|
||||
|
||||
Reference in New Issue
Block a user