/**
 * @author amr
 * @date 23/11/21
 * @version 1.0.0
 * @project SIEau
 * @table admin_execution
 */

# --- !Ups

CREATE TABLE public.admin_execution (
	id serial4 NOT NULL,
	execution_timestamp timestamptz NOT NULL,
	duration int8 NULL,
	commentaires text NULL,
	login varchar(25) not NULL,
	token varchar(50) NOT NULL,
	codestatut int4 not NULL
);
CREATE INDEX ind_admin_execution_pk ON public.admin_execution USING btree (id);

create table admin_journal (
	id serial4 NOT NULL,
	execution_id int8 NOT NULL ,
	commentaire text NULL,
	execution_timestamp timestamptz NULL
);
create index ind_admin_journal_pk on
public.admin_journal
	using btree (id);

# --- !Downs

drop table admin_execution ;
drop table admin_journal;