feat(server): country geocoding for remote locations (#10950)

Co-authored-by: Zack Pollard <zackpollard@ymail.com>
Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
This commit is contained in:
pokjay
2024-07-18 14:27:07 +03:00
committed by GitHub
parent ee22bbc85c
commit 4f89195702
7 changed files with 137 additions and 8 deletions

View File

@@ -0,0 +1,14 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class NaturalEarthCountries1720375641148 implements MigrationInterface {
name = 'NaturalEarthCountries1720375641148'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`CREATE TABLE "naturalearth_countries" ("id" SERIAL NOT NULL, "admin" character varying(50) NOT NULL, "admin_a3" character varying(3) NOT NULL, "type" character varying(50) NOT NULL, "coordinates" polygon NOT NULL, CONSTRAINT "PK_21a6d86d1ab5d841648212e5353" PRIMARY KEY ("id"))`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`DROP TABLE "naturalearth_countries"`);
}
}