-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
110 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,7 +129,13 @@ COPY public.monitor_batch_process (uuid, "createdAt", "updatedAt", version, "pro | |
-- Data for Name: open_data_places; Type: TABLE DATA; Schema: public; Owner: - | ||
-- | ||
|
||
COPY public.open_data_places (uuid, "createdAt", "updatedAt", version, nom, adresse, "complementAdresse", ville, "codePostal", departement, region, latitude, longitude, source, "uniqueId", software, "structureId", mail) FROM stdin; | ||
COPY public.open_data_places (uuid, "createdAt", "updatedAt", version, nom, adresse, "complementAdresse", ville, "codePostal", departement, region, latitude, longitude, source, "uniqueId", software, mail, "structureType", "domifaStructureId", "soliguideStructureId") FROM stdin; | ||
2e311da7-5acf-4c4b-844a-49fe237ff60b 2023-12-13 20:22:43.289737+01 2023-12-13 20:22:43.289737+01 1 Structure de Test d'import rue de l import \N Nantes 44000 44 52 47.2139730 -1.5369230 domifa 4 domifa [email protected] \N 4 \N | ||
9a53b6e9-0e58-43d0-bebd-d4f679f6aa74 2023-12-13 20:22:43.302599+01 2023-12-13 20:22:43.302599+01 1 CCAS de Test 1 rue de l ocean \N Asnieres sur seine 92600 92 11 48.9037590 2.2837460 domifa 1 domifa [email protected] \N 1 \N | ||
ad8a4b0a-c5a1-40eb-9f92-220d1e9c548f 2023-12-13 20:22:43.307155+01 2023-12-13 20:22:43.307155+01 1 CCAS de Cayenne 24 avenue louis pasteur \N Cayenne 97300 973 03 4.9434540 -52.3244580 domifa 5 domifa [email protected] \N 5 \N | ||
bb9949ec-206d-4ad6-88a4-1309dec2f2a0 2023-12-13 20:22:43.310765+01 2023-12-13 20:22:43.310765+01 1 Organisme agréé de Test 1 rue du test de l organise agree \N Nantes 44000 44 52 47.2181930 -1.5613680 domifa 3 domifa [email protected] \N 3 \N | ||
3f1db6bf-14d0-48a0-903e-bec13998480d 2023-12-13 20:22:43.313864+01 2023-12-13 20:22:43.313864+01 1 CIAS de Test 2 rue du test \N Pessac 33600 33 75 44.8176020 -0.6129570 domifa 2 domifa [email protected] \N 2 \N | ||
af7254b8-78c7-4760-a821-f8e20b996628 2023-12-13 20:22:44.125163+01 2023-12-13 20:22:44.125163+01 1 ESI La maison du partage 32 rue bouret 75019 paris \N Paris 75019 75 11 48.8817267 2.3742211 soliguide 0 other [email protected] \N \N 0 | ||
\. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -155,7 +155,13 @@ COPY public.monitor_batch_process (uuid, "createdAt", "updatedAt", version, "pro | |
-- Data for Name: open_data_places; Type: TABLE DATA; Schema: public; Owner: - | ||
-- | ||
|
||
COPY public.open_data_places (uuid, "createdAt", "updatedAt", version, nom, adresse, "complementAdresse", ville, "codePostal", departement, region, latitude, longitude, source, "uniqueId", software, "structureId", mail) FROM stdin; | ||
COPY public.open_data_places (uuid, "createdAt", "updatedAt", version, nom, adresse, "complementAdresse", ville, "codePostal", departement, region, latitude, longitude, source, "uniqueId", software, mail, "structureType", "domifaStructureId", "soliguideStructureId") FROM stdin; | ||
2e311da7-5acf-4c4b-844a-49fe237ff60b 2023-12-13 20:22:43.289737+01 2023-12-13 20:22:43.289737+01 1 Structure de Test d'import rue de l import \N Nantes 44000 44 52 47.2139730 -1.5369230 domifa 4 domifa [email protected] \N 4 \N | ||
9a53b6e9-0e58-43d0-bebd-d4f679f6aa74 2023-12-13 20:22:43.302599+01 2023-12-13 20:22:43.302599+01 1 CCAS de Test 1 rue de l ocean \N Asnieres sur seine 92600 92 11 48.9037590 2.2837460 domifa 1 domifa [email protected] \N 1 \N | ||
ad8a4b0a-c5a1-40eb-9f92-220d1e9c548f 2023-12-13 20:22:43.307155+01 2023-12-13 20:22:43.307155+01 1 CCAS de Cayenne 24 avenue louis pasteur \N Cayenne 97300 973 03 4.9434540 -52.3244580 domifa 5 domifa [email protected] \N 5 \N | ||
bb9949ec-206d-4ad6-88a4-1309dec2f2a0 2023-12-13 20:22:43.310765+01 2023-12-13 20:22:43.310765+01 1 Organisme agréé de Test 1 rue du test de l organise agree \N Nantes 44000 44 52 47.2181930 -1.5613680 domifa 3 domifa [email protected] \N 3 \N | ||
3f1db6bf-14d0-48a0-903e-bec13998480d 2023-12-13 20:22:43.313864+01 2023-12-13 20:22:43.313864+01 1 CIAS de Test 2 rue du test \N Pessac 33600 33 75 44.8176020 -0.6129570 domifa 2 domifa [email protected] \N 2 \N | ||
af7254b8-78c7-4760-a821-f8e20b996628 2023-12-13 20:22:44.125163+01 2023-12-13 20:22:44.125163+01 1 ESI La maison du partage 32 rue bouret 75019 paris \N Paris 75019 75 11 48.8817267 2.3742211 soliguide 0 other [email protected] \N \N 0 | ||
\. | ||
|
15 changes: 0 additions & 15 deletions
15
packages/backend/src/_migrations/1702480247859-auto-migration.ts
This file was deleted.
Oops, something went wrong.
67 changes: 67 additions & 0 deletions
67
packages/backend/src/_migrations/1702483465656-auto-migration.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm"; | ||
import { domifaConfig } from "../config"; | ||
|
||
export class AutoMigration1702483465656 implements MigrationInterface { | ||
name = "AutoMigration1702483465656"; | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
if ( | ||
domifaConfig().envId === "preprod" || | ||
domifaConfig().envId === "prod" || | ||
domifaConfig().envId === "local" | ||
) { | ||
await queryRunner.query(`ALTER TABLE "open_data_places" ADD "mail" text`); | ||
|
||
await queryRunner.query( | ||
`ALTER TABLE "open_data_places" ADD "structureType" text` | ||
); | ||
|
||
await queryRunner.query( | ||
`ALTER TABLE "open_data_places" DROP CONSTRAINT "FK_d10ac71fca9180b787ef468659e"` | ||
); | ||
await queryRunner.query( | ||
`DROP INDEX "public"."IDX_d10ac71fca9180b787ef468659"` | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "open_data_places" DROP COLUMN "structureId"` | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "open_data_places" ADD "domifaStructureId" integer` | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "open_data_places" ADD "soliguideStructureId" integer` | ||
); | ||
|
||
await queryRunner.query( | ||
`CREATE INDEX "IDX_7ee1e7a8d9441eb76ab7b4aa5a" ON "open_data_places" ("domifaStructureId") ` | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "open_data_places" ADD CONSTRAINT "FK_7ee1e7a8d9441eb76ab7b4aa5a3" FOREIGN KEY ("domifaStructureId") REFERENCES "structure"("id") ON DELETE CASCADE ON UPDATE NO ACTION` | ||
); | ||
} | ||
} | ||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`ALTER TABLE "open_data_places" DROP CONSTRAINT "FK_7ee1e7a8d9441eb76ab7b4aa5a3"` | ||
); | ||
await queryRunner.query( | ||
`DROP INDEX "public"."IDX_7ee1e7a8d9441eb76ab7b4aa5a"` | ||
); | ||
|
||
await queryRunner.query( | ||
`ALTER TABLE "open_data_places" DROP COLUMN "soliguideStructureId"` | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "open_data_places" DROP COLUMN "domifaStructureId"` | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "open_data_places" ADD "structureId" integer` | ||
); | ||
await queryRunner.query( | ||
`CREATE INDEX "IDX_d10ac71fca9180b787ef468659" ON "open_data_places" ("structureId") ` | ||
); | ||
await queryRunner.query( | ||
`ALTER TABLE "open_data_places" ADD CONSTRAINT "FK_d10ac71fca9180b787ef468659e" FOREIGN KEY ("structureId") REFERENCES "structure"("id") ON DELETE CASCADE ON UPDATE NO ACTION` | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters