changement du nom des images dans le compose + inversion BU et agence

develop
Clement FERRERE 3 years ago
parent 337d20d041
commit c70d4c8e94
  1. 19
      db/init_db.sql
  2. 4
      docker-compose.yml

@ -6,19 +6,19 @@ DROP DATABASE IF EXISTS collaborateur_epa;
CREATE DATABASE IF NOT EXISTS collaborateur_epa /*!40100 DEFAULT CHARACTER SET latin1 */; CREATE DATABASE IF NOT EXISTS collaborateur_epa /*!40100 DEFAULT CHARACTER SET latin1 */;
USE collaborateur_epa; USE collaborateur_epa;
DROP TABLE IF EXISTS agence; DROP TABLE IF EXISTS businessunit;
CREATE TABLE IF NOT EXISTS agence( CREATE TABLE IF NOT EXISTS businessunit(
Id int NOT NULL AUTO_INCREMENT, Id int NOT NULL AUTO_INCREMENT,
Name varchar(100) NOT NULL UNIQUE, Name varchar(100) NOT NULL UNIQUE,
PRIMARY KEY (Id) PRIMARY KEY (Id)
); );
DROP TABLE IF EXISTS businessunit; DROP TABLE IF EXISTS agence;
CREATE TABLE IF NOT EXISTS businessunit( CREATE TABLE IF NOT EXISTS agence(
Id int NOT NULL AUTO_INCREMENT, Id int NOT NULL AUTO_INCREMENT,
Name varchar(100) NOT NULL UNIQUE, Name varchar(100) NOT NULL UNIQUE,
agenceId int NOT NULL, BusinessUnitId int NOT NULL,
CONSTRAINT FK_BUSINESS_UNIT_AGENCE FOREIGN KEY (agenceId) references agence(Id), CONSTRAINT FK_BUSINESS_UNIT_AGENCE FOREIGN KEY (BusinessUnitId) references businessunit(Id),
PRIMARY KEY (Id) PRIMARY KEY (Id)
); );
@ -34,7 +34,7 @@ CREATE TABLE IF NOT EXISTS collaborateur(
Address varchar(200) NOT NULL, Address varchar(200) NOT NULL,
Telephone varchar(15) NOT NULL, Telephone varchar(15) NOT NULL,
PersonalMail varchar(100) NOT NULL, PersonalMail varchar(100) NOT NULL,
ApsideMail varchar(100) NOT NULL, ApsideMail varchar(100) NOT NULL UNIQUE,
ResignationDate date NOT NULL, ResignationDate date NOT NULL,
businessunitId int NOT NUll, businessunitId int NOT NUll,
ReferrerId int NOT NULL, ReferrerId int NOT NULL,
@ -43,8 +43,9 @@ CREATE TABLE IF NOT EXISTS collaborateur(
PRIMARY KEY (Id) PRIMARY KEY (Id)
); );
INSERT INTO agence(Id, Name) VALUES (1,'Clermont-Ferrand');
INSERT INTO businessunit(Id, Name, agenceId) VALUES (1,'Cournon',1); INSERT INTO businessunit(Id, Name) VALUES (1,'Business Unit Clermont-Ferrand');
INSERT INTO agence(Id, Name, BusinessUnitId) VALUES (1,'Cournon',1);
INSERT INTO collaborateur(Name, FirstName, BirthDate, Gender, Status, ChildrenNumber, Address, Telephone, PersonalMail, INSERT INTO collaborateur(Name, FirstName, BirthDate, Gender, Status, ChildrenNumber, Address, Telephone, PersonalMail,
ApsideMail, ResignationDate, businessunitId, ReferrerId) ApsideMail, ResignationDate, businessunitId, ReferrerId)
VALUES ('Dupont','Marie','1990-08-08','feminin','cadre',0,'adresse','tel','pmail','amail','2030-08-08',1,1); VALUES ('Dupont','Marie','1990-08-08','feminin','cadre',0,'adresse','tel','pmail','amail','2030-08-08',1,1);

@ -20,7 +20,7 @@ services:
- ./db/init_db.sql:/docker-entrypoint-initdb.d/init.sql - ./db/init_db.sql:/docker-entrypoint-initdb.d/init.sql
api: api:
image: ${DOCKER_REGISTRY-}espacecollabbackendapi image: ${DOCKER_REGISTRY-}harbor.apsdigit.lan/collaborateur-epa/preprod/api:beta
build: build:
context: ./../Collaborateur-Epa-Back/Collaborateur_Epa_Back context: ./../Collaborateur-Epa-Back/Collaborateur_Epa_Back
dockerfile: espacecollab.backend.api/Dockerfile dockerfile: espacecollab.backend.api/Dockerfile
@ -38,7 +38,7 @@ services:
front: front:
image: ${DOCKER_REGISTRY-}collab-front image: ${DOCKER_REGISTRY-}harbor.apsdigit.lan/collaborateur-epa/preprod/front:beta
build: build:
context: ./../Collaborateur-Epa-Front context: ./../Collaborateur-Epa-Front
dockerfile: ./Dockerfile dockerfile: ./Dockerfile

Loading…
Cancel
Save