From ae3db17485407c858d9b01b8585b9a92018b6790 Mon Sep 17 00:00:00 2001 From: "michele.artini" Date: Fri, 11 Jun 2021 15:50:29 +0200 Subject: [PATCH] schema --- .../src/main/resources/application.properties | 2 +- .../src/main/resources/sql/schema.sql | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 apps/dnet-directindex-api/src/main/resources/sql/schema.sql diff --git a/apps/dnet-directindex-api/src/main/resources/application.properties b/apps/dnet-directindex-api/src/main/resources/application.properties index 0847f918..b0b34f18 100644 --- a/apps/dnet-directindex-api/src/main/resources/application.properties +++ b/apps/dnet-directindex-api/src/main/resources/application.properties @@ -2,7 +2,7 @@ server.port=8080 spring.profiles.active=dev -maven.pom.path = /META-INF/maven/eu.dnetlib.dhp/dnet-directindex-application/effective-pom.xml +maven.pom.path = /META-INF/maven/eu.dnetlib.dhp/dnet-directindex-api/effective-pom.xml spring.main.banner-mode = off diff --git a/apps/dnet-directindex-api/src/main/resources/sql/schema.sql b/apps/dnet-directindex-api/src/main/resources/sql/schema.sql new file mode 100644 index 00000000..89757a99 --- /dev/null +++ b/apps/dnet-directindex-api/src/main/resources/sql/schema.sql @@ -0,0 +1,11 @@ +DROP TABLE IF EXISTS records; + +CREATE TABLE records( + id text PRIMARY KEY, + type text, + operation text NOT NULL, + body text, + created_by text, + creation_date timestamp with time zone NOT NULL DEFAULT now(), + execution_date timestamp with time zone +);