

/**
 * @author AMR
 * @date 03/03/20
 * @version 1.0.0
 */

-- a ne pas mettre en préprod
# --- !Ups

INSERT INTO public.contacts(codecontact, nom, email)
select max(codecontact+1) ,'Anthony' ,'anthony.martin-rio@aquasys.fr' from  public.contacts ;


INSERT INTO public.utilisateurs(login, password, isadmin,  codecontact  )
	select   'Anthony2', 'AMRAMRAMRAMR', 1, max(codecontact ) from  public.contacts;

# --- !Downs

delete from contacts where codecontact= (select codecontact from utilisateurs where login ='Anthony2');

delete from utilisateurs where login ='Anthony2';
--	delete   from public.utilisateurs where codecontact=  select max(codecontact ) from  public.contacts;
--	delete from  public.contacts where codecontact= select max(codecontact ) from  public.contacts;
