MarseyWorld/migrations/20241014-stop-requiring-ema...

9 lines
322 B
MySQL
Raw Permalink Normal View History

alter table transactions alter column email drop not null;
alter table transactions add column user_id int;
ALTER TABLE ONLY public.transactions
ADD CONSTRAINT transactions_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
CREATE INDEX transactions_user_idx ON public.transactions USING btree (user_id);