From 5a04f0bd4f9dadc4b6dc39a68fecf7b60788f977 Mon Sep 17 00:00:00 2001 From: Roberto Orden Erena Date: Sun, 22 Dec 2019 07:22:56 +0100 Subject: [PATCH] =?UTF-8?q?Actualizaci=C3=B3n=20de=20datos=20y=20dise?= =?UTF-8?q?=C3=B1o=20BBDD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 2.database/01.CreateTables.sql | 8 ++++---- 2.database/02. Datos_prueba.sql | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/2.database/01.CreateTables.sql b/2.database/01.CreateTables.sql index d6424eb..cb84533 100644 --- a/2.database/01.CreateTables.sql +++ b/2.database/01.CreateTables.sql @@ -70,13 +70,13 @@ if exists (SELECT 1 FROM pg_sequences WHERE schemaname='myhealth' and sequencena drop sequence myhealth.codigoidentificacionpaciente; end if; -CREATE SEQUENCE myhealth.ProfesionalNumber +CREATE SEQUENCE myhealth.profesionalnumber INCREMENT 1 START 1000 MINVALUE 1000 CACHE 1; -CREATE SEQUENCE myhealth.CodigoIdentificacionPaciente +CREATE SEQUENCE myhealth.codigoidentificacionpaciente INCREMENT 1 START 1000 MINVALUE 1000 @@ -246,8 +246,8 @@ ALTER TABLE myhealth.question CREATE TABLE myhealth.medicaltest ( id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ), - date date, - "time" abstime, + date DATE, + "time" TIME, observations TEXT COLLATE pg_catalog."default", highresimage bytea, type INTEGER, diff --git a/2.database/02. Datos_prueba.sql b/2.database/02. Datos_prueba.sql index 0e3aaf4..6c63969 100644 --- a/2.database/02. Datos_prueba.sql +++ b/2.database/02. Datos_prueba.sql @@ -81,4 +81,12 @@ INSERT INTO myhealth.patient(personalidentificationcode, password, nif, surname, ,('PAT#109','912EC803B2CE49E4A541068D495AB570','53986482P','Carretero Ayala', 'Eduardo@example.ecom','Eduardo', 10); +INSERT INTO myhealth.question(title, message, status, response, patientid, familydoctorid) VALUES + ('Question 1','Pues eso pringao, cómo va la cosa?',0,null,1,1), + ('Question 2','Pues eso pringao, cómo va la cosa?',0,null,1,2), + ('Question 2','Pues eso pringao, cómo va la cosa?',0,null,2,1); +INSERT INTO myhealth.medicaltest(date, "time", observations, highresimage,"type",patientid, specialistdoctorid) VALUES + ('2019/12/15',now(),'',null,0,1,1), + ('2019/12/15',now(),'',null,0,1,2), + ('2019/12/15',now(),'',null,0,2,1); \ No newline at end of file