-- ALTER TABLE project DROP COLUMN token RESTRICT;
-- ALTER TABLE project DROP COLUMN notify RESTRICT;

-- CREATE TABLE notification(
-- 	openaire_id	VARCHAR(60)		NOT NULL,
-- 	user_email	VARCHAR(256)	NOT NULL,
-- 	frequency	INT				NOT NULL,
-- 	notify		BOOLEAN			DEFAULT TRUE,
-- 	last_interaction_date TIMESTAMP WITHOUT TIME ZONE,
-- 	PRIMARY KEY(openaire_id, user_email)
-- );


CREATE TABLE metrics(
	id  VARCHAR(60) NOT NULL,
	metrics_per_dashboard json NOT NULL,
	date TIMESTAMP WITH TIME ZONE,
	PRIMARY KEY(id)
);

insert into metrics (id, metrics_per_dashboard, date) values('current', '[]', current_timestamp);
