ad510dd6fd
* faster geodata import * revert logging change * unlogged tables * leave spare connection * use expression index instead of generated column * do btree indexing with others
38 lines
940 B
TypeScript
38 lines
940 B
TypeScript
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
|
|
@Entity('naturalearth_countries', { synchronize: false })
|
|
export class NaturalEarthCountriesEntity {
|
|
@PrimaryGeneratedColumn('identity', { generatedIdentity: 'ALWAYS' })
|
|
id!: number;
|
|
|
|
@Column({ type: 'varchar', length: 50 })
|
|
admin!: string;
|
|
|
|
@Column({ type: 'varchar', length: 3 })
|
|
admin_a3!: string;
|
|
|
|
@Column({ type: 'varchar', length: 50 })
|
|
type!: string;
|
|
|
|
@Column({ type: 'polygon' })
|
|
coordinates!: string;
|
|
}
|
|
|
|
@Entity('naturalearth_countries_tmp', { synchronize: false })
|
|
export class NaturalEarthCountriesTempEntity {
|
|
@PrimaryGeneratedColumn('identity', { generatedIdentity: 'ALWAYS' })
|
|
id!: number;
|
|
|
|
@Column({ type: 'varchar', length: 50 })
|
|
admin!: string;
|
|
|
|
@Column({ type: 'varchar', length: 3 })
|
|
admin_a3!: string;
|
|
|
|
@Column({ type: 'varchar', length: 50 })
|
|
type!: string;
|
|
|
|
@Column({ type: 'polygon' })
|
|
coordinates!: string;
|
|
}
|