Skip to content

Commit

Permalink
Ajuste
Browse files Browse the repository at this point in the history
  • Loading branch information
uo289039 committed Nov 27, 2023
1 parent 8738232 commit 6ab3127
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 39 deletions.
16 changes: 8 additions & 8 deletions src/main/resources/data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ delete from CategoriaCompeticion;
delete from Competicion;
delete from PagosTransferencia;

<<<<<<< HEAD

delete from Categoria;
=======


insert into Competicion(id,nombre_c,fecha,descr,distancia,tipo,nPlazas,iban_c,cancelacion,devolucion,fechaCanc,tiemposparciales) values
(100,'San Silvestre','2023-12-12','antes inscripcion',42,'Montaña',40,'ES12 1234 5678 9098 7545 6787','Si',10,'2023-12-08',false),
Expand All @@ -29,10 +29,10 @@ insert into Participa(correoElec,id_c,estadoI) values
('[email protected]',100,'Preinscrito'),('[email protected]',102,'Inscrito'),('[email protected]',101,'Preinscrito'),
('[email protected]',100,'Inscrito'), ('[email protected]',100,'Inscrito');

>>>>>>> refs/heads/main


<<<<<<< HEAD


insert into Competicion(id,nombre_c,fecha,descr,distancia,tipo,nPlazas,devolucion,cancelacion) values
(100,'San Silvestre','2023-12-09','antes inscripcion',42,'Montaña',40,10,'Si'),
(101,'Media Maraton','2023-12-10','en fase 3',21,'Ruta',30,5,'Si'),
Expand All @@ -58,10 +58,10 @@ insert into Participa(correoElec,id_c,estadoI,ritmo,completado) values
INSERT into PagosTransferencia (nombre_Completo,correoElec,dni,importe,iban,id_c) values
('Alexander Graham','[email protected]',1,52.5,'ES12 1234 5678 9098 7545 6787',100),
('Hunter Davis','[email protected]',7,52.5,'ES21 4059 0197 7333 9419 9129',103);
>>>>>>> refs/heads/main


<<<<<<< HEAD




INSERT into PagosTransferencia (nombre_Completo,correoElec,dni,importe,iban,id_c) values
Expand Down Expand Up @@ -101,7 +101,7 @@ values ('[email protected]','San Silvestre','Preinscrito','2023-09-11'),
('[email protected]','San Silvestre','Inscrito','2023-10-01'),
('[email protected]','San Silvestre','Inscrito','2023-10-01'),
('[email protected]','Vuelta Ciclista','Preinscrito','2023-11-03');
=======

insert into Plazo(id_c,descr,fechaIni,fechaFin,cuota) values
(100,'Primer plazo','2016-11-01','2016-12-04',50.0),
(101,'Primer plazo','2023-12-30','2023-12-05',42.0),
Expand Down Expand Up @@ -134,4 +134,4 @@ values ('[email protected]','San Silvestre','Preinscrito','2023-09-11'),
('[email protected]','San Silvestre','Inscrito','2023-10-01'),
('[email protected]','San Silvestre','Inscrito','2023-10-01'),
('[email protected]','Vuelta Ciclista','Preinscrito','2023-11-03');
>>>>>>> refs/heads/main

42 changes: 11 additions & 31 deletions src/main/resources/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
--delete table Categoria;

drop table if exists Competicion;
<<<<<<< HEAD

create table Competicion(id int primary key not null, nombre_c varchar(20) not null, fecha date not null, descr varchar(32),
distancia decimal(4,2), tipo varchar(20) not null, nPlazas int not null, cancelacion varcchar(5) not null,
devolucion int not null, fechaCanc date,
check(tipo in('Montaña','Ruta')),
check(cancelacion in('Si','No'))); --iban_c varchar(40) unique,
=======

create table Competicion(
id int primary key not null,
nombre_c varchar(20) not null,
Expand All @@ -37,15 +37,15 @@ create table Competicion(
check(tipo in('Montaña','Ruta')),
check(cancelacion in('Si','No'))
);
>>>>>>> refs/heads/main


drop table if exists Atleta;
<<<<<<< HEAD

create table Atleta(dni int primary key not null,f_nacimiento date not null, nombre varchar(20) not null,
sexo varchar(7) not null,inscripcion date not null, formaPago varchar(15) not null, correoE varchar(15) not null,
poblacion varchar(25) not null, telefono varchar(12) not null, pais varchar(30) not null, iban varchar(40) unique,
check(sexo in ('hombre','mujer')), check(formaPago in ('transferencia','tarjeta','')));
=======

create table Atleta(
dni int primary key not null,
f_nacimiento date not null,
Expand All @@ -60,10 +60,10 @@ create table Atleta(
check(sexo in ('hombre','mujer')),
check(formaPago in ('transferencia','tarjeta',''))
);
>>>>>>> refs/heads/main


drop table if exists Participa;
<<<<<<< HEAD

create table Participa(correoElec varchar(15) not null, id_c int not null, estadoI varchar(15) not null,dorsal INTEGER, tiempo varchar(6),
ritmo decimal(4,2), completado varchar(15) not null,
constraint pk_Participa PRIMARY KEY(correoElec,id_c),
Expand All @@ -85,30 +85,18 @@ create table Participa(
constraint FK_Participa_Competicion Foreign Key (id_c) references "Competicion" (id),
constraint FK_Participa_Atleta Foreign Key (correoElec) references "Atleta" (correoE),
check(estadoI in ('No Inscrito','Preinscrito','Inscrito','Participado')));
>>>>>>> refs/heads/main



drop table if exists PagosTransferencia;
<<<<<<< HEAD

create table PagosTransferencia(nombre_Completo varchar(40) not null, correoElec varchar(25) not null, iban varchar(35) not null,
dni int not null, importe decimal(4,2), id_c int not null,
constraint pk_PagosTransferencia PRIMARY KEY(iban,correoElec),
constraint FK_PagosTransferencia_Participa Foreign Key (correoElec,id_c) references "Participa" (correoE,id_c));



=======
create table PagosTransferencia(
nombre_Completo varchar(40) not null,
correoElec varchar(25) not null,
iban varchar(35) not null,
dni int not null,
importe decimal(4,2),
id_c int not null,
constraint pk_PagosTransferencia PRIMARY KEY(iban,correoElec),
constraint FK_PagosTransferencia_Participa Foreign Key (correoElec,id_c) references "Participa" (correoE,id_c));
>>>>>>> refs/heads/main


drop table if exists DatosInscripciones;
create table DatosInscripciones(
Expand All @@ -118,7 +106,6 @@ create table DatosInscripciones(
correoE varchar(15) not null,
constraint FK_DatosAtleta_Participa Foreign Key (correoE) references "Participa" (correoElec));

<<<<<<< HEAD


drop table if exists TiempoParcial;
Expand Down Expand Up @@ -155,14 +142,7 @@ create table CategoriaCompeticion(
genero varchar(15),
constraint fk_Categoria_competicion foreign key (id_c) references "Competicion" (id));

drop table if exists Plazo;
create table Plazo(
id_c int not null,
descr varchar(30) not null,
fechaIni varchar(20) not null,
fechaFin varchar(20) not null,
cuota decimal(4,2) not null,
constraint fk_Plazo_Competicion foreign key (id_c) references "Competicion" (id));


drop table if exists Club;
create table Club(
Expand All @@ -171,5 +151,5 @@ create table Club(
nombre varchar(30) not null,
numAtletas varchar(20) not null,
constraint fk_Plazo_Competicion foreign key (id_comp) references "Competicion" (id));
>>>>>>> refs/heads/main


0 comments on commit 6ab3127

Please sign in to comment.