Actualización de datos y diseño BBDD

This commit is contained in:
Roberto Orden Erena
2019-12-22 07:22:56 +01:00
parent bc1e05ab36
commit 5a04f0bd4f
2 changed files with 12 additions and 4 deletions

View File

@@ -70,13 +70,13 @@ if exists (SELECT 1 FROM pg_sequences WHERE schemaname='myhealth' and sequencena
drop sequence myhealth.codigoidentificacionpaciente; drop sequence myhealth.codigoidentificacionpaciente;
end if; end if;
CREATE SEQUENCE myhealth.ProfesionalNumber CREATE SEQUENCE myhealth.profesionalnumber
INCREMENT 1 INCREMENT 1
START 1000 START 1000
MINVALUE 1000 MINVALUE 1000
CACHE 1; CACHE 1;
CREATE SEQUENCE myhealth.CodigoIdentificacionPaciente CREATE SEQUENCE myhealth.codigoidentificacionpaciente
INCREMENT 1 INCREMENT 1
START 1000 START 1000
MINVALUE 1000 MINVALUE 1000
@@ -246,8 +246,8 @@ ALTER TABLE myhealth.question
CREATE TABLE myhealth.medicaltest CREATE TABLE myhealth.medicaltest
( (
id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ), id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ),
date date, date DATE,
"time" abstime, "time" TIME,
observations TEXT COLLATE pg_catalog."default", observations TEXT COLLATE pg_catalog."default",
highresimage bytea, highresimage bytea,
type INTEGER, type INTEGER,

View File

@@ -81,4 +81,12 @@ INSERT INTO myhealth.patient(personalidentificationcode, password, nif, surname,
,('PAT#109','912EC803B2CE49E4A541068D495AB570','53986482P','Carretero Ayala', 'Eduardo@example.ecom','Eduardo', 10); ,('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);