chore: refresh gramsrv public release
This commit is contained in:
parent
75cebe8dbf
commit
70b6820474
1274 changed files with 378751 additions and 59919 deletions
20
deploy/migrations/0025_peer_usernames.down.sql
Normal file
20
deploy/migrations/0025_peer_usernames.down.sql
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
CREATE TABLE IF NOT EXISTS public.channel_usernames (
|
||||
username_lower text NOT NULL,
|
||||
channel_id bigint NOT NULL,
|
||||
updated_at timestamp with time zone DEFAULT now() NOT NULL,
|
||||
CONSTRAINT channel_usernames_nonempty_check CHECK (username_lower <> '')
|
||||
);
|
||||
|
||||
ALTER TABLE ONLY public.channel_usernames
|
||||
ADD CONSTRAINT channel_usernames_pkey PRIMARY KEY (username_lower);
|
||||
|
||||
INSERT INTO public.channel_usernames (username_lower, channel_id)
|
||||
SELECT username_lower, peer_id
|
||||
FROM public.peer_usernames
|
||||
WHERE peer_type = 'channel';
|
||||
|
||||
DROP TRIGGER IF EXISTS users_delete_peer_username ON public.users;
|
||||
DROP TRIGGER IF EXISTS channels_delete_peer_username ON public.channels;
|
||||
DROP FUNCTION IF EXISTS public.delete_user_peer_username();
|
||||
DROP FUNCTION IF EXISTS public.delete_channel_peer_username();
|
||||
DROP TABLE IF EXISTS public.peer_usernames;
|
||||
Loading…
Add table
Add a link
Reference in a new issue