Skip to content

Commit

Permalink
feat(open-data): add email to data from soliguide
Browse files Browse the repository at this point in the history
  • Loading branch information
pYassine committed Dec 13, 2023
1 parent f2e7bd2 commit 7bc347a
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 141 deletions.
4 changes: 2 additions & 2 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
fileignoreconfig:
- filename: _scripts/db/dumps/domifa_test.postgres.restore-data-only.sql
checksum: cc7d142171d74e4ec6fac672fdf444f811db83367028dbe23a4d38196a01fa15
checksum: fc2c3720259ae183a86581dc71daa2e2762964470d112ec8cc4bb7c83b44bc02
- filename: _scripts/db/dumps/domifa_test.postgres.truncate-restore-data-only.sql
checksum: 4961fa117ae2fd0b34744927341881ac645dd14b68c7b7ade799223080376bba
checksum: cc017bae84047b7761f61da63226cd3e419dc0bdd86264214922d4eeaf4cb5c1
- filename: packages/backend/src/_common/decorators/IsValidPasswordDecorator.ts
checksum: f0d4b3cd2e6e2d9b1e0271c34d64adacf87a5f1e7a505402a20869962543608d
- filename: packages/backend/src/_migrations/1699910877010-auto-migration.ts
Expand Down
Binary file modified _scripts/db/dumps/domifa_test.postgres.custom.gz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ 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") FROM stdin;
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;
\.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ 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") FROM stdin;
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;
\.


Expand Down
26 changes: 0 additions & 26 deletions packages/backend/src/_migrations/1701726929874-auto-migration.ts

This file was deleted.

22 changes: 0 additions & 22 deletions packages/backend/src/_migrations/1701726996834-manual-migration.ts

This file was deleted.

39 changes: 0 additions & 39 deletions packages/backend/src/_migrations/1701788512483-manual-migration.ts

This file was deleted.

30 changes: 0 additions & 30 deletions packages/backend/src/_migrations/1701870413794-auto-migration.ts

This file was deleted.

20 changes: 0 additions & 20 deletions packages/backend/src/_migrations/1701901668716-auto-migration.ts

This file was deleted.

15 changes: 15 additions & 0 deletions packages/backend/src/_migrations/1702480247859-auto-migration.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { MigrationInterface, QueryRunner } from "typeorm";

export class AutoMigration1702480247859 implements MigrationInterface {
name = "AutoMigration1702480247859";

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "open_data_places" ADD "mail" text`);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "open_data_places" DROP COLUMN "mail"`
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ export class OpenDataPlaceTable extends AppTypeormTable<OpenDataPlaceTable> {
@JoinColumn({ name: "structureId", referencedColumnName: "id" })
structureId: number;

@Column({ type: "text", nullable: true })
mail: string;

public constructor(entity?: Partial<OpenDataPlaceTable>) {
super(entity);
Object.assign(this, entity);
Expand Down
1 change: 1 addition & 0 deletions packages/backend/src/open-data-places/load-soliguide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const getFromSoliguide = async () => {
longitude: place.position.location.coordinates[0],
source: "soliguide",
uniqueId: place.lieu_id.toString(),
mail: place?.entity?.mail?.toString(),
})
);
}
Expand Down

0 comments on commit 7bc347a

Please sign in to comment.