diff --git a/.config/config.json b/.config/config.json index 563e0964b..87aafbd03 100644 --- a/.config/config.json +++ b/.config/config.json @@ -26,25 +26,27 @@ "prod": "api-invasivesbc.apps.silver.devops.gov.bc.ca" }, "certificateURL": { - "dev": "https://dev.oidc.gov.bc.ca/auth/realms/dfmlcg7z/protocol/openid-connect/certs", - "test": "https://test.oidc.gov.bc.ca/auth/realms/dfmlcg7z/protocol/openid-connect/certs", - "prod": "https://oidc.gov.bc.ca/auth/realms/dfmlcg7z/protocol/openid-connect/certs" + "dev": "https://dev.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/certs", + "test": "https://test.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/certs", + "prod": "https://loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/certs" }, "sso": { "dev": { - "url": "https://dev.oidc.gov.bc.ca", - "clientId": "invasives-bc", - "realm": "dfmlcg7z" + "url": "https://dev.loginproxy.gov.bc.ca", + + "clientId": "inspect-bc-mussels-4817", + "realm": "standard" }, "test": { - "url": "https://test.oidc.gov.bc.ca", - "clientId": "invasives-bc", - "realm": "dfmlcg7z" + "url": "https://test.loginproxy.gov.bc.ca", + + "clientId": "inspect-bc-mussels-4817", + "realm": "standard" }, "prod": { - "url": "https://oidc.gov.bc.ca", - "clientId": "invasives-bc", - "realm": "dfmlcg7z" + "url": "https://loginproxy.gov.bc.ca", + "clientId": "inspect-bc-mussels-4817", + "realm": "standard" } }, "migrationInfo" : { @@ -64,4 +66,4 @@ "dbSeed": "yes" } } -} \ No newline at end of file +} diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..81b52effe --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,12 @@ +## Pull Request Standards + +- [ ] The title of the PR is accurate +- [ ] The title includes the type of change [`HOTFIX`, `FEATURE`, `etc`] +- [ ] The PR title includes the ticket number in format of `[LUCY-###]` +- [ ] Documentation is updated to reflect change + +# Description + +This PR includes the following proposed change(s): + +- { List all the changes made } diff --git a/.github/labeller.yml b/.github/labeller.yml new file mode 100644 index 000000000..d527297b0 --- /dev/null +++ b/.github/labeller.yml @@ -0,0 +1,24 @@ +# Auto Label Git Action Config +# 'label_name' +# - path_of_diff/where/code_lives/to_base_label_upon + +# Any change to any file in .github/workflows +'GitHub Actions': + - .github/workflows/* + +# Any change to the docker-compose file or any dockerfile in the repo +'Docker': + - '**/Dockerfile' + - '**/docker-compose*' + +# Any changes to file or subfolders in /api +'Backend': + - api/**/* + +# Any changes to file or subfolders in /app +'Frontend': + - app/**/* + +# Any change to any file in any directory with a .env in name +'Environment Variables': + - '**/*.env*' diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 9cf7a6a5f..000000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,167 +0,0 @@ -# PR Based Deploy On OpensShift -# Builds and Deploys unmerged PR's to temporary pods/services/routes/etc in the OpenShift Dev environment. -name: Deploy on OpensShift - -on: - pull_request: - types: [opened, reopened, synchronize] - -jobs: - # Print variables for logging and debugging purposes - checkEnv: - name: Check Env variables - runs-on: ubuntu-latest - steps: - - name: Print Env Vars - run: | - echo Git Base Ref: ${{ github.base_ref }} - echo Git Build ID: ${{ github.event.number }} - echo Git Pull Request Ref: ${{ github.event.pull_request.head.sha }} - echo OC CLI Version: $(oc version) - - # Build the API - buildAPI: - name: Build API - runs-on: ubuntu-latest - if: ${{ github.event.pull_request.merged == false}} - env: - BUILD_ID: ${{ github.event.number }} - steps: - # Checkout the PR branch - - name: Checkout Target Branch - uses: actions/checkout@v2 - - # Install Node - for `node` and `npm` commands - - name: Setup Node.js - uses: actions/setup-node@v2 - with: - node-version: 10.16 - - # Log in to OpenShift. - # Note: The secrets needed to log in are NOT available if the PR comes from a FORK. - # PR's must originate from a branch off the original repo or else all openshift `oc` commands will fail. - - name: Log in to OpenShift - run: oc login --token=${{ secrets.TOOLS_SA_TOKEN }} --server=https://api.silver.devops.gov.bc.ca:6443 - - # Build the api images - - name: Build API Images - working-directory: "./api/.pipeline/" - run: | - npm ci - DEBUG=* npm run build -- --pr=$BUILD_ID - - # Build the web frontend app - buildAPP: - name: Build App - runs-on: ubuntu-latest - if: ${{ github.event.pull_request.merged == false}} - env: - BUILD_ID: ${{ github.event.number }} - steps: - # Checkout the PR branch - - name: Checkout Target Branch - uses: actions/checkout@v2 - - # Install Node - for `node` and `npm` commands - - name: Setup Node.js - uses: actions/setup-node@v2 - with: - node-version: 10.16 - - # Log in to OpenShift. - # Note: The secrets needed to log in are NOT available if the PR comes from a FORK. - # PR's must originate from a branch off the original repo or else all openshift `oc` commands will fail. - - name: Log in to OpenShift - run: oc login --token=${{ secrets.TOOLS_SA_TOKEN }} --server=https://api.silver.devops.gov.bc.ca:6443 - - # Build the app images - - name: Build APP Images - working-directory: "./app/.pipeline/" - run: | - npm ci - DEBUG=* npm run build -- --pr=$BUILD_ID - - # Deploy App, API images - deploy: - name: Deploy App, API - runs-on: ubuntu-latest - if: ${{ github.event.pull_request.merged == false}} - env: - BUILD_ID: ${{ github.event.number }} - needs: - - buildAPI - - buildAPP - steps: - # Checkout the PR branch - - name: Checkout Target Branch - uses: actions/checkout@v2 - - # Install Node - for `node` and `npm` commands - - name: Setup Node.js - uses: actions/setup-node@v2 - with: - node-version: 10.16 - - # Log in to OpenShift. - # Note: The secrets needed to log in are NOT available if the PR comes from a FORK. - # PR's must originate from a branch off the original repo or else all openshift `oc` commands will fail. - - name: Log in to OpenShift - run: oc login --token=${{ secrets.TOOLS_SA_TOKEN }} --server=https://api.silver.devops.gov.bc.ca:6443 - - # Deploy the api - - name: Deploy API - working-directory: "./api/.pipeline/" - run: | - npm ci - DEBUG=* npm run pre-deploy -- --pr=$BUILD_ID --env=dev - DEBUG=* npm run setup -- --pr=$BUILD_ID --env=dev - DEBUG=* npm run seed -- --pr=$BUILD_ID --env=dev - DEBUG=* npm run deploy -- --pr=$BUILD_ID --env=dev - DEBUG=* npm run deploy-tools -- --pr=$BUILD_ID --env=dev - - # Deploy the app - - name: Deploy App - working-directory: "./app/.pipeline" - run: | - npm ci - DEBUG=* npm run deploy -- --pr=$BUILD_ID --env=dev - - # Deploy App, API images and related build/deployment artifacts - clean: - name: Clean Deployment Artifacts for App, API - runs-on: ubuntu-latest - if: ${{ github.event.pull_request.merged == true && (github.base_ref != 'dev' && github.base_ref != 'prod') }} - env: - BUILD_ID: ${{ github.event.number }} - steps: - # Checkout the PR branch - - name: Checkout Target Branch - uses: actions/checkout@v2 - - # Install Node - for `node` and `npm` commands - - name: Setup Node.js - uses: actions/setup-node@v2 - with: - node-version: 10.16 - - # Log in to OpenShift. - # Note: The secrets needed to log in are NOT available if the PR comes from a FORK. - # PR's must originate from a branch off the original repo or else all openshift `oc` commands will fail. - - name: Log in to OpenShift - run: oc login --token=${{ secrets.TOOLS_SA_TOKEN }} --server=https://api.silver.devops.gov.bc.ca:6443 - - # Clean the api deployment artifacts - - name: Clean API Deployment - working-directory: "./api/.pipeline/" - run: | - npm ci - DEBUG=* npm run clean -- --pr=$BUILD_ID --env=build - DEBUG=* npm run clean -- --pr=$BUILD_ID --env=dev - - # Clean the app deployment artifacts - - name: Clean APP Deployment - working-directory: "./app/.pipeline/" - run: | - npm ci - DEBUG=* npm run clean -- --pr=$BUILD_ID --env=build - DEBUG=* npm run clean -- --pr=$BUILD_ID --env=dev diff --git a/.github/workflows/deployStatic.yml b/.github/workflows/deployStatic.yml index 386c943a9..b57533105 100644 --- a/.github/workflows/deployStatic.yml +++ b/.github/workflows/deployStatic.yml @@ -8,6 +8,10 @@ on: branches: - dev - prod + push: + branches: + - dev + - prod jobs: # Print variables for logging and debugging purposes @@ -162,11 +166,11 @@ jobs: working-directory: "./api/.pipeline/" run: | npm ci - DEBUG=* npm run pre-deploy -- --pr=$BUILD_ID --env=test --type=static --branch=${{ github.base_ref }} - DEBUG=* npm run setup -- --pr=$BUILD_ID --env=test --type=static --branch=${{ github.base_ref }} - DEBUG=* npm run seed -- --pr=$BUILD_ID --env=test --type=static --branch=${{ github.base_ref }} - DEBUG=* npm run deploy -- --pr=$BUILD_ID --env=test --type=static --branch=${{ github.base_ref }} - DEBUG=* npm run deploy-tools -- --pr=$BUILD_ID --env=test --type=static --branch=${{ github.base_ref }} + DEBUG=* npm run pre-deploy -- --pr=1054 --env=test --type=static --branch=${{ github.base_ref }} + DEBUG=* npm run setup -- --pr=1054 --env=test --type=static --branch=${{ github.base_ref }} + DEBUG=* npm run seed -- --pr=1054 --env=test --type=static --branch=${{ github.base_ref }} + DEBUG=* npm run deploy -- --pr=1054 --env=test --type=static --branch=${{ github.base_ref }} + DEBUG=* npm run deploy-tools -- --pr=1054 --env=test --type=static --branch=${{ github.base_ref }} # Deploy the app - name: Deploy App diff --git a/.github/workflows/e2e.bkp b/.github/workflows/e2e.bkp index d9f107f73..73a059878 100644 --- a/.github/workflows/e2e.bkp +++ b/.github/workflows/e2e.bkp @@ -59,6 +59,6 @@ jobs: env: host: 'http://localhost:3033' with: - env: 'username=cypress,password=${{ secrets.CYPRESS_TEST_PASSWORD }},authRealm=dfmlcg7z,authClientId=invasives-bc,authUrl=https://dev.oidc.gov.bc.ca/auth' + env: 'username=cypress,password=${{ secrets.CYPRESS_TEST_PASSWORD }},authRealm=standard,authClientId=inspect-bc-mussels-4817,authUrl=https://dev.loginproxy.gov.bc.ca/auth' working-directory: './app/cypress-e2e' record: true \ No newline at end of file diff --git a/.github/workflows/pr-labeller.yml b/.github/workflows/pr-labeller.yml new file mode 100644 index 000000000..9c7ee682e --- /dev/null +++ b/.github/workflows/pr-labeller.yml @@ -0,0 +1,15 @@ +name: "Pull Request Labeler" +on: +- pull_request_target + +jobs: + triage: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v4 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/labeller.yml diff --git a/.gitignore b/.gitignore index d7576baf3..1d47cc1e2 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ node_modules/ .env .npm + +.v8flags* diff --git a/FormFrameworkREADME.md b/FormFrameworkREADME.md index 63b9bcba2..c8d4fc61c 100644 --- a/FormFrameworkREADME.md +++ b/FormFrameworkREADME.md @@ -23,24 +23,15 @@ Install the following to run the application locally After installation, follow the instructions below to start local development 1. To install all the dependencies, go to the following folder from the root directory and run either `npm install` or `npm ci` - `api/api_sources` - Installs the packages required by the backend node application - - `app/lucy` - To install the packages needed for the angular application 2. Navigate to `api` directory and run either of the following - `make local-debug` - To run the application with logs - - `make local` - To start the application in the background and hide the logs + - `make run-local` - To start the application in the background and hide the logs 3. Other handy make commands: - `make api` - Shell into the api container. Local api container is customized with all development related CLI tools. Using api container shell is recommended. - `make database` - To shell into the database container. As an additional step, the schema needs to be set by running the command given below before running any queries ```ts SET SCHEMA 'invasivesbc' ``` - -Note: - -To run any command which is related to pipeline, install the dependencies from the following folders - - `api/.pipeline` - - `app/.pipeline` - - `.jenkins/.pipeline` - ## Step-by-Step Guide to Create a New Form ### 1. Create the .yaml file for the schema diff --git a/MigrationsREADME.md b/MigrationsREADME.md new file mode 100644 index 000000000..152045b51 --- /dev/null +++ b/MigrationsREADME.md @@ -0,0 +1,241 @@ +# Migrations + +This is an abridged version to make a new table in the database. A more robust version of these steps exist in the [Form Framework README here](FormFrameworkREADME.md). + +--- + +1. [Creating a New Table](#creating-a-new-table) +1. [Create the YAML File](#create-the-yaml-file) +1. [Define the Schema](#define-the-schema) +1. [Creating the Handler](#creating-the-handler) +1. [New Sub-directory, SQL file, Model, and Controller](#new-sub-directory-sql-file-model-and-controller) +1. [Creating the Migration File](#creating-the-migration-file) +1. [Run the Migration](#run-the-migration) + + +## Creating a New Table + +To add a new table you would need to follow these steps in the running Docker container. From the `/api` directory, use the command `make api` to shell into the `invasivesbc-lucy-api` container. You'll need to `cd` into the `scripts` folder. + +> *Note the* `camelCase` *vs* `PascalCase` *vs* `snake_case` *in the commands and namings below* + +### Create the YAML File + +Start by generating a skeleton YAML file for the schema using the `create.schema.ts` script. You can do this by running the following command: + +``` +ts-node create.schema.ts -s [TableName] +``` + +This will create a new YAML file in the `api/api_sources/schema-files` directory with the name `[tableName].schema.yaml` + +### Define the Schema + +Open the newly created `[tableName].schema.yaml` file and define the schema using a similar template below: + +> *Note: This YAML file defines the* `BlowBy table` *with the columns* `blowByTime`, `watercraftComplexity`*, and* `reportedToRapp`. *The relations section establishes a many-to-one relationship with the* `observer_workflow` *table* + +```yml +version: '1.0' +description: Schema file for table blow_by +externalTables: [] +includes: + - observerWorkflow.schema.yaml +schemas: + BlowBySchema: + name: blow_by + description: 'Table to store blow by data for watercraft observer.' + baseSchema: RecordSchema + meta: + resource: true + api: /mussels/blow-bys + base: api + resource: true + baseModel: Record + columns: + id: + name: blow_by_id + comment: Auto generated primary key + definition: SERIAL PRIMARY KEY + observerWorkflowId: + name: observer_workflow_id + comment: Foreign key to observer_workflow + definition: INT NULL + foreignTable: observer_workflow + refColumn: observer_workflow_id + blowByTime: + name: blow_by_time + comment: Time of blow by + definition: VARCHAR(100) NULL + watercraftComplexity: + name: watercraft_complexity + comment: Watercraft complexity + definition: VARCHAR(100) NULL + reportedToRapp: + name: reported_to_rapp + comment: Reported to rapp + definition: BOOLEAN NOT NULL DEFAULT false + relations: + observerWorkflow: + header: + key: blow_by.observer_workflow + default: Observer Workflow + description: + key: blow_by.observer_workflow.description + default: Observer workflow associated with the blow by + type: single + relationshipType: many-to-one + schema: ObserverWorkflowSchema + meta: + skipValidation: true + versions: [] + fields: {} + +``` + +### Creating the Handler + +Next, create a handler for the schema. In the `api/api_sources/sources/database/database-schema/musselApp.schema.ts` file, add the following code: + +```ts +export class [TableName]Schema extends RecordTableSchema { + get schemaFilePath(): string { + return getYAMLFilePath('[tableName].schema.yaml'); + } +} + +``` + +### New Sub-directory, SQL file, Model, and Controller + +Now, create a new sub-directory inside the `api/api_sources/schema-migration-sql` directory named `[TableName]Schema`. Then, execute the following command: + +``` +ts-node schema.manager.ts -s [TableName]Schema –m +``` + +> *Note: the names must match what’s in the YAML file under* `schemas` + +- This command generates a SQL file inside the `[TableName]Schema` sub-directory and a `[tableName].ts` file inside `api/api_sources/sources/database/models/` as well as a `[tableName.controller.ts` file. The SQL file creates and configures the `[TableName]` table in the database. + +- The `[tableName].ts` file will import some classes that might not be used in the new table – this will throw a linting error if not removed. + +- The `[tableName].controller.ts` file will be pretty sparse when it’s created. Use this template to update the file as needed: + +```ts +// ** BlowByController ** // +import { RecordController } from '../generic.data.models'; +import { BlowBy} from '../../models'; +import { BlowBySchema } from '../../database-schema'; + +/** +* @description Data Model Controller Class for BlowBySchema and BlowBy +*/ +export class BlowByController extends RecordController { + /** + * @description Getter for shared instance + */ + public static get shared(): BlowByController { + return this.sharedInstance(BlowBy, BlowBySchema) as BlowByController; + } + + public async all(query?: any): Promise { + const options = query || {}; + options.relations = ['observerWorkflowId']; + return await this.repo.find(options) as BlowBy[]; + } + + get exportKeyPriorities(): {[key: string]: number} { + const basePriority = 1000; + const topPriority = 100; + return { + id: basePriority + topPriority, + observerWorkflowId: (basePriority + topPriority - 10), + blowByTime: (basePriority + topPriority - 50), + watercraftComplexity: (basePriority + topPriority - 60), + reportedToRapp: (basePriority + topPriority - 70), + }; + } + + processForExport(data: BlowBy): any { + const result: any = {}; + Object.keys(data).forEach((key) => { + if (this.exportKeyMapper[key]) { + result[this.exportKeyMapper[key]] = data[key]; + } + }); + + return result; + } +} +// ---------------- + +``` + +### Creating the Migration File + +To generate a SQL migration file, shell into the Docker container using `make api` and execute the following command: + +``` +typeorm migration:create -n MigrationFor[TableName] +``` + +This command generates a SQL migration file and a TypeScript file in the `scripts` directory. You’ll need to move it to the `migrations` directory. + +In the newly created migration file, make the proper changes for the `UP` and `DOWN` commands, similar to this template: + +```ts +import {MigrationInterface, QueryRunner} from 'typeorm'; +import { AppDBMigrator } from '../applicationSchemaInterface'; +import { BlowBySchema, ObserverWorkflowSchema } from '../database-schema'; + +export class CreateBlowBy1703888022971 extends AppDBMigrator implements MigrationInterface { + blowBySchema: BlowBySchema; + observerWorkflowSchema: ObserverWorkflowSchema; + + /** + * Setup + */ + setup() { + // Adding BlowBy schema to migrator + this.blowBySchema = new BlowBySchema(); + this.observerWorkflowSchema = new ObserverWorkflowSchema(); + + // Create BlowBy table + this.addSchemaInitVersion(this.blowBySchema); + + // Add FK ref + this.addUpMigration(this.blowBySchema.className, 'BlowByConstraint.sql'); + } + + /** + * UP: Create DB method + */ + public async up(queryRunner: QueryRunner): Promise { + // Start Log + this.log('[START]', 'UP'); + // Running all up migration files + await this.runQuerySqlFiles(this.upMigrations(), queryRunner); + this.log('[END]', 'UP'); + } + + /** + * Down: Revert + */ + public async down(queryRunner: QueryRunner): Promise { + this.log('[START]', 'DOWN'); + await queryRunner.query(this.blowBySchema.dropTable()); + await queryRunner.query(this.observerWorkflowSchema.dropTable()); + this.log('[END]', 'DOWN'); + } +} + +``` + +### Run the Migration + +Finally, run the database migration by executing the following command: + +``` +npm run migration +``` diff --git a/PIPELINE.md b/PIPELINE.md index 4b2c8cb16..8272bf737 100644 --- a/PIPELINE.md +++ b/PIPELINE.md @@ -1,6 +1,6 @@ # Invasives BC Pipeline -Invasives BC automatic Jenkins pipeline check code integrity (Continuous integration) and perform deployment to various environment (Continuous deployment). +Invasives BC automatic Jenkins pipeline checks code integrity (Continuous integration) and perform deployment to various environment (Continuous deployment). ## Pull Request with Continuous Integration @@ -14,11 +14,11 @@ Invasives BC automatic Jenkins pipeline check code integrity (Continuous integra ## Branch Action for Continuous Deployment -Any changes like Push or Merge to dev branch triggers a build and deployment to Dev/Test Environment. +Any changes like Push or Merge to `dev` branch triggers a build and deployment to Dev/Test Environment. ## Continuous Production Deployment -* Create Pull Request with target branch as **prod** (conventionally source branch will be __dev__). +* Create Pull Request with target branch as `prod` (conventionally source branch will be `dev`). * Automatic pipeline continuous integration stages (Build and Test) will invoke. CI stages check integrity of new code, must finish with success. diff --git a/README.md b/README.md index c06102c97..70d1968ba 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,15 @@ -# Invasive Species BC -[![img](https://img.shields.io/badge/Lifecycle-Dormant-ff7f2a)](https://github.com/bcgov/repomountie/blob/master/doc/lifecycle-badges.md) -Note: In progress of being deprecated by /bcgov/invasivesbc. API still supports /bcgov/mussels-ios +# Invasive Mussels BC -https://bcdevexchange.org/projects/prj-invasive-species - -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=bcgov_lucy-web&metric=alert_status)](https://sonarcloud.io/dashboard?id=bcgov_lucy-web) ![ZAP Baseline Scan](https://github.com/bcgov/lucy-web/workflows/ZAP%20Baseline%20Scan/badge.svg) +This API currently supports the [Invasives Mussels BC iOS app](https://github.com/bcgov/invasivesBC-mussels-iOS/tree/inspect-272-update-readme) only. A new InvasivesBC inventory and database for the creation, treatment, and report on BC Invasive plants and animals can be found [here](https://github.com/bcgov/invasivesbc). ## Introduction -Invasive species are non-native plants and animals whose introduction and spread in British Columbia cause significant economic, social or environmental damage. This application tracks the observation, treatment, and monitoring of invasive species in the Province of British Columbia. +Invasive species are non-native plants and animals whose introduction and spread in British Columbia cause significant economic, social or environmental damage. This application tracks the observation, treatment, and monitoring of invasive Quagga and Zebra mussels in the Province of British Columbia. This project is part of the Species and Ecosystems Information System Modernization (SEISM) program. ## Table of Contents -1. [Project Status](#project-status) 1. [Audience](#audience) -1. [Features](#features) 1. [Getting Help or Reporting an Issue](#getting-help-or-reporting-an-issue) 1. [How to Contribute](#how-to-contribute) 1. [Architecture](#architecture) @@ -26,38 +20,16 @@ This project is part of the Species and Ecosystems Information System Modernizat 1. [Running the Application](#running-the-application) 1. [License](#license) -## Project Status - -This application is in active development and has not yet been released. - ## Audience -Anyone with a valid IDIR or BCeID login may access the application to view data that is being tracked. - -In addition, the application is intended for use by: - -* Surveyors who observe and record the absence, presence, and spread of invasive species -* Subject matter experts who perform a variety of duties, including to record and analyze data and create action plans -* Contractors who implement recommended treatments for observed invasive species -* Administrators who manage the application and its users - -## Features - -This application is anticipated to include the following main features: - -1. Support for IDIR and BCeID access -1. User roles and permissions management -1. Interactive maps displaying multiple data layers -1. Observations of invasive species absence/presence -1. Recommendations, planning, and application records of treatments -1. Monitoring of treatment outcomes -1. Query and export of data -1. Auditing and reports -1. Bulk data entry and mobile device data entry +This API is intended to be used by the Inspect iOS app where Inspection Officers and Admins can submit Shifts and Watercraft Inspections. Users with a valid IDIR can login to the Inspect iOS app, but only users with the following roles can access and submit data: +- `inspectAppOfficer` +- `inspectAppAdmin` +- `admin` ## Getting Help or Reporting an Issue -To report bugs/issues/features requests, please file an [issue](https://github.com/bcgov/lucy-web/issues). +To report bugs/issues/features requests, please file an [issue](https://github.com/bcgov/lucy-web/issues) or contact the [Sustainment Team](mailto:sustainment.team@gov.bc.ca). ## How to Contribute @@ -67,7 +39,7 @@ Please note that this project is released with a [Contributor Code of Conduct](C ## Architecture -This application uses PostgreSQL (with PostGIS), TypeORM, and Angular. Containers are built using Jenkins pipelines and Docker. Our environments run on an OpenShift container platform cluster. +This application uses PostgreSQL (with PostGIS) and TypeORM. Containers are built using Jenkins pipelines and Docker. Our environments run on an OpenShift container platform cluster. ## Project Structure @@ -87,10 +59,11 @@ This application uses PostgreSQL (with PostGIS), TypeORM, and Angular. Container ## Documentation -* [Client Readme](app/README.md) -* [Server Readme](api/README.md) -* [Form Framework Tool Readme](FormFrameworkREADME.md) -* [Jenkins Readme](.jenkins/README.md) +* [Client README](app/README.md) +* [Server README](api/README.md) +* [Form Framework Tool README](FormFrameworkREADME.md) +* [Migrations Demo README](MigrationsREADME.md) +* [Jenkins README](.jenkins/README.md) * [Pipeline](PIPELINE.md) * Our database is documented using [SchemaSpy](http://schemaspy.org/) * [Load Test](loadTest/README.md) @@ -102,52 +75,56 @@ This application uses PostgreSQL (with PostGIS), TypeORM, and Angular. Container On Windows, you may require a tool like [Visual Studio Code](https://code.visualstudio.com/) or [Cygwin](http://www.cygwin.com/) in order to use the Makefile. -If you wish to deploy the application, you will also need to install [OpenShift CLI](https://docs.openshift.com/container-platform/3.7/cli_reference/get_started_cli.html). - ## Setup Instructions -Begin by cloning the repository to create a local copy. The repository on GitHub provides instructions: https://github.com/bcgov/lucy-web - -All subsequent commands are run at the project root. - -For example: +Begin by cloning the repository to create a local copy. -`git clone https://github.com/bcgov/lucy-web` +``` +git clone git@github.com:bcgov/lucy-web.git +``` +> *Note: the default branch is* `dev` - *more information about [branches and deployment here](api/README.md#deployment-to-openshift)* -`cd lucy-web` -Finally, create initial local environment files: +Create initial local environment files: 1. Create an empty `.env` file at the `api` directory root 1. Within `api/env_config` create a `env.local` file, using `env.example` as a reference 1. Update the app secret values in `env.local` -Note: these files are git-ignored. +Note: these files are `.gitignored`. ## Running the Application *Using Docker:* -The client (frontend app) and server(s) (backend api/api-mobile) of the application run in separate containers. To run all of the application containers, use the following commands: +To run all of the backend containers, use the following commands: + +1. `cd` into the `api` directory + +2. Run the application containers + +``` +make local +``` -* Run the appliation containers -`make local` +or run the application containers in debug mode -* Run the application containers in debug mode - `make local-debug` - This will print additional logging statements to the console, which may be useful when debugging the backend. +``` +make local-debug +``` -* Close and clean the application containers - `make clean-local` - This will close and remove the containers and images created by either of the above commands. +This will print additional logging statements to the console, which may be useful when debugging the backend. - _Note: See the `Makefile` for the full list of commands._ +## Closing the Application -To run a subset of the application contains, refer to the `README` and `Makefile` in their respective sub-folders (ie: `./api` or `./api-mobile`). +To close and clean the application containers +``` +make clean-local +``` -## Acknowledgements +This will close and remove the containers and images created by either of the above commands. -[![SonarCloud](https://sonarcloud.io/images/project_badges/sonarcloud-black.svg)](https://sonarcloud.io/dashboard?id=bcgov_lucy-web) +> *Note: See the* `Makefile` *for the full list of commands.* ## License diff --git a/api/.docker/db/Dockerfile.local b/api/.docker/db/Dockerfile.local index 085a465ed..606514eba 100644 --- a/api/.docker/db/Dockerfile.local +++ b/api/.docker/db/Dockerfile.local @@ -1,7 +1,6 @@ -FROM postgres:9.5 +FROM postgres:14.6 - -ENV POSTGISV 2.5 +ENV POSTGISV 3 ENV TZ America/New_York ENV PORT 5432 @@ -20,8 +19,6 @@ RUN apt-get update \ # set time zone RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - - # add init script RUN mkdir -p /docker-entrypoint-initdb.d COPY ./create_postgis.sql /docker-entrypoint-initdb.d/postgis.sql diff --git a/api/.gitignore b/api/.gitignore index 255e0d849..bca658483 100755 --- a/api/.gitignore +++ b/api/.gitignore @@ -44,7 +44,7 @@ app_api/npm-debug.log app_api/dist-server app_api/_app_data - +*.vscode-server/ # NPM Dir node_modules/ # Logs diff --git a/api/.pipeline/build.js b/api/.pipeline/build.js index e44d512ed..ab7c619da 100755 --- a/api/.pipeline/build.js +++ b/api/.pipeline/build.js @@ -3,6 +3,6 @@ const task = require('./lib/build.js'); const taskDBBuild = require('./lib/build.db.js'); const settings = require('./lib/config.js'); // Building DB Image -taskDBBuild(Object.assign(settings, { phase: 'build'})); +// taskDBBuild(Object.assign(settings, { phase: 'build'})); // Building App Image task(Object.assign(settings, { phase: 'build'})); diff --git a/api/.pipeline/deploytools.js b/api/.pipeline/deploytools.js index 585ef6f82..34dc51c0c 100644 --- a/api/.pipeline/deploytools.js +++ b/api/.pipeline/deploytools.js @@ -2,4 +2,4 @@ const settings = require('./lib/config.js') const task = require('./lib/deploy.schemaspy.js') -task(Object.assign(settings, { phase: settings.options.env})); \ No newline at end of file +// task(Object.assign(settings, { phase: settings.options.env})); \ No newline at end of file diff --git a/api/.pipeline/lib/deploy.db.js b/api/.pipeline/lib/deploy.db.js index 979f2810e..4f73e7d8c 100644 --- a/api/.pipeline/lib/deploy.db.js +++ b/api/.pipeline/lib/deploy.db.js @@ -44,7 +44,7 @@ module.exports = (settings) => { 'IMAGE_STREAM_VERSION': phases.build.tag, 'POSTGRESQL_DATABASE': 'InvasiveBC', 'IMAGE_STREAM_NAMESPACE': phases.build.namespace, - 'VOLUME_CAPACITY': (`${phases[phase].name}-postgresql${phases[phase].suffix}` == 'invasivesbc-api-postgresql-dev-deploy') ? "20Gi" : "3Gi" + 'VOLUME_CAPACITY': (`${phases[phase].name}-postgresql${phases[phase].suffix}` == 'invasivesbc-api-postgresql-dev-deploy') ? "2Gi" : "3Gi" } })) diff --git a/api/.pipeline/lib/test.api.js b/api/.pipeline/lib/test.api.js index 3b5b4dc41..c535f4ff7 100644 --- a/api/.pipeline/lib/test.api.js +++ b/api/.pipeline/lib/test.api.js @@ -35,7 +35,7 @@ module.exports = (settings) => { 'ENVIRONMENT': phases[phase].env || 'dev', 'DB_SERVICE_NAME': `${phases[phase].name}-postgresql${phases[phase].suffix}`, 'IMAGE': imageStream.image.dockerImageReference, - 'CERTIFICATE_URL': 'https://dev.oidc.gov.bc.ca/auth/realms/dfmlcg7z/protocol/openid-connect/certs', + 'CERTIFICATE_URL': 'https://dev.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/certs', 'DB_MIGRATION_TYPE': phases[phase].migrationInfo.type, 'DB_CLEAN_UP': phases[phase].migrationInfo.cleanup, 'DB_SEED': phases[phase].migrationInfo.dbSeed diff --git a/api/.pipeline/lib/wait.js b/api/.pipeline/lib/wait.js index 74f0f5ba1..62809dc92 100644 --- a/api/.pipeline/lib/wait.js +++ b/api/.pipeline/lib/wait.js @@ -110,5 +110,5 @@ module.exports = (resourceName, settings, countArg, timeoutArg) => { }; - setTimeout(check, (timeout + 10000)); + setTimeout(check, (timeout + 30000)); }; \ No newline at end of file diff --git a/api/.pipeline/pre.deploy.js b/api/.pipeline/pre.deploy.js index dfbe20162..558727783 100644 --- a/api/.pipeline/pre.deploy.js +++ b/api/.pipeline/pre.deploy.js @@ -26,4 +26,4 @@ const settings = require('./lib/config.js'); const taskDeployDB = require('./lib/deploy.db.js'); // Deploying DB -taskDeployDB(Object.assign(settings, { phase: settings.options.env})); +// taskDeployDB(Object.assign(settings, { phase: settings.options.env})); diff --git a/api/Makefile b/api/Makefile index e7a111bd7..02f4283dc 100755 --- a/api/Makefile +++ b/api/Makefile @@ -1,5 +1,6 @@ #!make # ------------------------------------------------------------------------------ + # Makefile -- SEISM API # ------------------------------------------------------------------------------ @@ -56,7 +57,7 @@ print-status: @echo " +---------------------------------------------------------+ " @echo " | Docker-Compose Config Output " @echo " +---------------------------------------------------------+ " - @docker-compose -f docker-compose.yml config + @docker-compose -f docker-compose.dev.yml config # ------------------------------------------------------------------------------ @@ -65,7 +66,7 @@ print-status: build-local: ## -- Target : Builds the local development containers. @echo "+\n++ Make: Building local Docker image ...\n+" - @docker-compose -f docker-compose.yml build + @docker-compose -f docker-compose.dev.yml build setup-local: ## -- Target : Prepares the environment variables for local development. @echo "+\n++ Make: Preparing project for local development ...\n+" @@ -74,22 +75,22 @@ setup-local: ## -- Target : Prepares the environment variables for local develop run-local: ## -- Target : Runs the local development containers. @echo "+\n++ Make: Running locally ...\n+" - @docker-compose -f docker-compose.yml up -d + @docker-compose -f docker-compose.dev.yml up -d run-debug: ## -- Target : Runs the local development containers. @echo "+\n++ Make: Running locally for debugging...\n+" @mkdir -p ./_app_data - @docker-compose -f docker-compose.yml up + @docker-compose -f docker-compose.dev.yml up close-local: ## -- Target : Closes the local development containers. @echo "+\n++ Make: Closing local container ...\n+" - @docker-compose -f docker-compose.yml down + @docker-compose -f docker-compose.dev.yml down clean-local: ## -- Target : Closes and clean local development containers. @echo "+\n++ Make: Closing and cleaning local container ...\n+" - @docker-compose -f docker-compose.yml down -v + @docker-compose -f docker-compose.dev.yml down -v @rm -rf ./_app_data test-local: ## -- Test API: Locally diff --git a/api/README.md b/api/README.md index 1dc95c10a..02c5a39d4 100755 --- a/api/README.md +++ b/api/README.md @@ -1,71 +1,44 @@ -# invasives BC - Invasive species management tools (ISMT) - API +# Invasives Mussels BC - API -This is the application source code for the Restful API of the invasive species database. +This is the application source code for the Restful API of the Invasive Mussels database. ----- ## Table of Contents -* [Setting Up](#Setting-Up) -* [Installing Node and NPM](#installing-node-and-npm) -* [Running the Application](#Running-the-Application) -* [Closing the Application](#closing-the-application) -* [Schema documentation](SchemaAndDatabaseController.md) -* [Deployment to OpenShift](#Deployment-to-OpenShift) -* [Clean Remote Instance of the application](#Clean-Remote-Instance-of-the-application) -* [Running Tests and SonarQube Analysis](#Running-Tests-and-SonarQube-Analysis) -* [SchemaSpy](#SchemaSpy) -* [Database Backup and Restoration](#Database-Backup-and-Restoration) -* [Cloud Script: Change User role](#Cloud-Script:-Change-user-role) +1. [Setting Up](#setting-up) +1. [Running the Application](#running-the-application) +1. [Closing the Application](#closing-the-application) +1. [Deployment to OpenShift](#deployment-to-openshift) +1. [Clean Remote Instance of the application](#clean-remote-instance-of-the-application) +1. [Running Tests](#running-tests) +1. [SchemaSpy](#schemaspy) +1. [Database Backup and Restoration](#database-backup-and-restoration) +1. [Cloud Script: Change User role](#cloud-script-change-user-role) ----- ## Setting Up ### Requirements -If you wish to use the Makefile commands to run the project with Docker, there are no additional requirements required for local development. - -To run locally without Docker, you will need to install Node and NPM. - -## Installing Node and NPM - -*For Mac OSX:* - -1. Install Xcode from the App Store - -2. Install Homebrew following the instructions here: https://brew.sh/ - -3. Install Node (Note: This will also install the Command Line Tools for Xcode) -`brew install node` - -*For Windows:* - -1. Select the appropriate installer (32-bit or 64-bit) from here: https://nodejs.org/en/download/ - -2. Run the installer and follow its prompts - -3. Restart your computer - -*Validate install:* - -You can test your installation by running `node -v` and `npm -v` which should produce output indicating which version has been installed. +The default, active branch for this repo is `dev`. All pull requests merged into `dev` will create new `dev` pods in Openshift. ### Setting Up Env * Make a copy of the example file `env.example` to create a `env.local` file * Create an empty `.env` file in the root dir `/api` -* Update the app secret values in `env.local` (env.local is .gitignored and will not be committed) +* Update the app secret values in `env.local` (env.local is `.gitignored` and will not be committed) ## Running the Application -*Run App in Local env* +### Run App in Local env * Run app: `make run-local` * Debug app: `make local-debug` -*Clean the Local App* +### Clean the Local App -Note: the database has a persistant volume when run with Docker. If you need to rebuild this, run `make clean-local` +Note: the database has a persistent volume when run with Docker. If you need to rebuild this, run `make clean-local` ## Closing the Application @@ -73,9 +46,9 @@ Run `make close-local` ## Deployment to OpenShift -Use command `oc` for local OpenShift build and deployment options. +When making a PR against the `dev` branch, any successful merges will automatically start a GitHub Action to build a new instance of the app in the Openshift **Dev** realm. -The command `make deploy-remote` may also be run to build and deploy remote containers using our Jenkins pipelines. +To deploy to production, you will need to merge your `dev` changes into the `prod` branch. This will start a GitHub action to deploy to production. ## Clean Remote Instance of the application @@ -88,16 +61,12 @@ The clean script can be run against each persistent environment. * make clean-remote PR=99 ENV=dev * make clean-remote PR=dev ENV=dev -*Warning*: Do *NOT* run against `test` or `prod`. It will cause *PERMANENT* deletion of all objects including `PVC`! be warned! +Warning: Do NOT run against `test` or `prod`. It will cause PERMANENT deletion of all objects including `PVC`! You've been warned! -## Running Tests and SonarQube Analysis +## Running Tests To run tests locally, run `npm test` or `npm test:all` to execute tests via [Mocha](https://www.npmjs.com/package/ts-mocha). -For local analysis with [SonarQube](https://www.sonarqube.org/), run `make sonarqube` - -To run tests and SonarQube analysis against a remote instance, run `make test-remote-api` - ## SchemaSpy To re-generate database documentation using SchemaSpy, run `make schema-spy-run` diff --git a/api/api_sources/.build/Dockerfile.local b/api/api_sources/.build/Dockerfile.local index f4e8285e7..2f1c5bb6c 100755 --- a/api/api_sources/.build/Dockerfile.local +++ b/api/api_sources/.build/Dockerfile.local @@ -1,8 +1,9 @@ FROM node:10 +RUN echo "deb http://archive.debian.org/debian stretch main" > /etc/apt/sources.list RUN apt-get update RUN apt-get install -y curl -RUN npm install -g npm +RUN npm install -g npm@6.14.12 # Create app directory diff --git a/api/api_sources/.build/Dockerfile.npm b/api/api_sources/.build/Dockerfile.npm index 5bdc9cc59..e92a7577f 100644 --- a/api/api_sources/.build/Dockerfile.npm +++ b/api/api_sources/.build/Dockerfile.npm @@ -1,7 +1,8 @@ FROM node:10 +RUN echo "deb http://archive.debian.org/debian stretch main" > /etc/apt/sources.list RUN apt-get update -RUN npm install -g npm +RUN npm install -g npm@6.14.12 # Create app directory @@ -24,4 +25,4 @@ COPY ./package*.json ./ RUN npm set progress=false && npm ci VOLUME ${HOME}/node_modules -ENTRYPOINT /usr/bin/tail -f /dev/null \ No newline at end of file +ENTRYPOINT /usr/bin/tail -f /dev/null diff --git a/api/api_sources/.build/Dockerfile.test b/api/api_sources/.build/Dockerfile.test index e7137b0bd..0df03c2e4 100644 --- a/api/api_sources/.build/Dockerfile.test +++ b/api/api_sources/.build/Dockerfile.test @@ -1,7 +1,8 @@ FROM node:10 +RUN echo "deb http://archive.debian.org/debian stretch main" > /etc/apt/sources.list RUN apt-get update -RUN npm install -g npm +RUN npm install -g npm@6.14.12 # Create app directory @@ -48,5 +49,3 @@ RUN npm run build # Entrypoint CMD [ "npm", "run", "git:run" ] - - diff --git a/api/api_sources/package-lock.json b/api/api_sources/package-lock.json index d1c2d06ab..46a5247c2 100644 --- a/api/api_sources/package-lock.json +++ b/api/api_sources/package-lock.json @@ -144,30 +144,52 @@ } }, "@gulp-sourcemaps/identity-map": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-1.0.2.tgz", - "integrity": "sha512-ciiioYMLdo16ShmfHBXJBOFm3xPC4AuwO4xeRpFeHz7WK9PYsWCmigagG2XyzZpubK4a3qNKoUBDhbzHfa50LQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-2.0.1.tgz", + "integrity": "sha512-Tb+nSISZku+eQ4X1lAkevcQa+jknn/OVUgZ3XCxEKIsLsqYuPoJwJOPQeaOk75X3WPftb29GWY1eqE7GLsXb1Q==", "dev": true, "requires": { - "acorn": "^5.0.3", - "css": "^2.2.1", - "normalize-path": "^2.1.1", + "acorn": "^6.4.1", + "normalize-path": "^3.0.0", + "postcss": "^7.0.16", "source-map": "^0.6.0", - "through2": "^2.0.3" + "through2": "^3.0.1" }, "dependencies": { + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true + }, + "through2": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", + "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "dev": true, + "requires": { + "inherits": "^2.0.4", + "readable-stream": "2 || 3" + } } } }, "@gulp-sourcemaps/map-sources": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz", - "integrity": "sha1-iQrnxdjId/bThIYCFazp1+yUW9o=", + "integrity": "sha512-o/EatdaGt8+x2qpb0vFLC/2Gug/xYPRXb6a+ET1wGYKozKN3krDWC/zZFZAtrzxJHuDL12mwdfEFKcKMNvc55A==", "dev": true, "requires": { "normalize-path": "^2.0.1", @@ -532,33 +554,33 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" + "mime-types": "~2.1.34", + "negotiator": "0.6.3" }, "dependencies": { "mime-db": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", - "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" }, "mime-types": { - "version": "2.1.24", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", - "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "requires": { - "mime-db": "1.40.0" + "mime-db": "1.52.0" } } } }, "acorn": { - "version": "5.7.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", - "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", "dev": true }, "agent-base": { @@ -776,7 +798,7 @@ "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, "array-initial": { "version": "1.1.0", @@ -1433,6 +1455,25 @@ } } }, + "call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "requires": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "dependencies": { + "function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" + } + } + }, "camelcase": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", @@ -1987,6 +2028,7 @@ "version": "0.5.3", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "dev": true, "requires": { "safe-buffer": "5.1.2" } @@ -2006,14 +2048,14 @@ } }, "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==" }, "cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, "cookiejar": { "version": "2.1.2", @@ -2105,22 +2147,37 @@ "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=" }, "css": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", - "integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz", + "integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==", "dev": true, "requires": { - "inherits": "^2.0.3", + "inherits": "^2.0.4", "source-map": "^0.6.1", - "source-map-resolve": "^0.5.2", - "urix": "^0.1.0" + "source-map-resolve": "^0.6.0" }, "dependencies": { + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true + }, + "source-map-resolve": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz", + "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0" + } } } }, @@ -2192,18 +2249,18 @@ }, "dependencies": { "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { "ms": "^2.1.1" } }, "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true } } @@ -2397,6 +2454,16 @@ "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=", "dev": true }, + "define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "requires": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + } + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -2498,9 +2565,9 @@ "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" }, "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" }, "detect-file": { "version": "1.0.0", @@ -2510,7 +2577,7 @@ "detect-newline": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", - "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", + "integrity": "sha512-CwffZFvlJffUg9zZA0uqrjQayUTC8ob94pnr5sFwaVv3IOmkfUHcWH+jXaQK3askE51Cqe8/9Ql/0uXNwqZ8Zg==", "dev": true }, "diagnostics": { @@ -2758,7 +2825,7 @@ "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" }, "end-of-stream": { "version": "1.4.1", @@ -2803,6 +2870,19 @@ "is-arrayish": "^0.2.1" } }, + "es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "requires": { + "get-intrinsic": "^1.2.4" + } + }, + "es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" + }, "es5-ext": { "version": "0.10.47", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.47.tgz", @@ -2868,7 +2948,7 @@ "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" }, "escape-string-regexp": { "version": "1.0.5", @@ -2923,12 +3003,12 @@ "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==" }, "event-emitter": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", "dev": true, "requires": { "d": "1", @@ -2990,46 +3070,150 @@ } }, "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", "requires": { - "accepts": "~1.3.7", + "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", + "body-parser": "1.20.2", + "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.4.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", - "depd": "~1.1.2", + "depd": "2.0.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "~1.1.2", + "finalhandler": "1.2.0", "fresh": "0.5.2", + "http-errors": "2.0.0", "merge-descriptors": "1.0.1", "methods": "~1.1.2", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" }, "dependencies": { + "body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "requires": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "dependencies": { + "content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==" + } + } + }, + "bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" + }, + "content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "requires": { + "safe-buffer": "5.2.1" + } + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, + "http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "requires": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "requires": { + "ee-first": "1.1.1" + } + }, "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "requires": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" } } }, @@ -3042,6 +3226,23 @@ "validator": "^11.0.0" } }, + "ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dev": true, + "requires": { + "type": "^2.7.2" + }, + "dependencies": { + "type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", + "dev": true + } + } + }, "ext-list": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", @@ -3274,17 +3475,32 @@ } }, "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", "requires": { "debug": "2.6.9", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "parseurl": "~1.3.3", - "statuses": "~1.5.0", + "statuses": "2.0.1", "unpipe": "~1.0.0" + }, + "dependencies": { + "on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "requires": { + "ee-first": "1.1.1" + } + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" + } } }, "find-cache-dir": { @@ -3436,9 +3652,9 @@ "dev": true }, "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" }, "fragment-cache": { "version": "0.2.1", @@ -3451,7 +3667,7 @@ "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==" }, "from2": { "version": "2.3.0", @@ -3549,6 +3765,30 @@ "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=" }, + "get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "requires": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "dependencies": { + "function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + } + } + }, "get-proxy": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/get-proxy/-/get-proxy-2.1.0.tgz", @@ -3760,6 +4000,14 @@ "sparkles": "^1.0.0" } }, + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "requires": { + "get-intrinsic": "^1.1.3" + } + }, "got": { "version": "6.7.1", "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", @@ -3866,22 +4114,22 @@ } }, "gulp-sourcemaps": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-2.6.5.tgz", - "integrity": "sha512-SYLBRzPTew8T5Suh2U8jCSDKY+4NARua4aqjj8HOysBh2tSgT9u4jc1FYirAdPx1akUxxDeK++fqw6Jg0LkQRg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-3.0.0.tgz", + "integrity": "sha512-RqvUckJkuYqy4VaIH60RMal4ZtG0IbQ6PXMNkNsshEGJ9cldUPRb/YCgboYae+CLAs1HQNb4ADTKCx65HInquQ==", "dev": true, "requires": { - "@gulp-sourcemaps/identity-map": "1.X", - "@gulp-sourcemaps/map-sources": "1.X", - "acorn": "5.X", - "convert-source-map": "1.X", - "css": "2.X", - "debug-fabulous": "1.X", - "detect-newline": "2.X", - "graceful-fs": "4.X", - "source-map": "~0.6.0", - "strip-bom-string": "1.X", - "through2": "2.X" + "@gulp-sourcemaps/identity-map": "^2.0.1", + "@gulp-sourcemaps/map-sources": "^1.0.0", + "acorn": "^6.4.1", + "convert-source-map": "^1.0.0", + "css": "^3.0.0", + "debug-fabulous": "^1.0.0", + "detect-newline": "^2.0.0", + "graceful-fs": "^4.0.0", + "source-map": "^0.6.0", + "strip-bom-string": "^1.0.0", + "through2": "^2.0.0" }, "dependencies": { "source-map": { @@ -4095,6 +4343,19 @@ "sparkles": "^1.0.0" } }, + "has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "requires": { + "es-define-property": "^1.0.0" + } + }, + "has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==" + }, "has-symbol-support-x": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", @@ -4154,6 +4415,21 @@ "is-stream": "^1.0.1" } }, + "hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "requires": { + "function-bind": "^1.1.2" + }, + "dependencies": { + "function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" + } + } + }, "he": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", @@ -4407,9 +4683,9 @@ "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" }, "ipaddr.js": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", - "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" }, "is-absolute": { "version": "1.0.0", @@ -5477,7 +5753,7 @@ "lru-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", - "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", "dev": true, "requires": { "es5-ext": "~0.10.2" @@ -5589,19 +5865,76 @@ } }, "memoizee": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.14.tgz", - "integrity": "sha512-/SWFvWegAIYAO4NQMpcX+gcra0yEZu4OntmUdrBaWrJncxOqAziGFlHxc7yjKVK2uu3lpPW27P27wkR82wA8mg==", + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", "dev": true, "requires": { - "d": "1", - "es5-ext": "^0.10.45", - "es6-weak-map": "^2.0.2", + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", "event-emitter": "^0.3.5", - "is-promise": "^2.1", - "lru-queue": "0.1", - "next-tick": "1", - "timers-ext": "^0.1.5" + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + }, + "dependencies": { + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "dev": true, + "requires": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, + "is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true + }, + "next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + } } }, "memory-fs": { @@ -5617,7 +5950,7 @@ "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" }, "merge-source-map": { "version": "1.1.0", @@ -6016,9 +6349,9 @@ } }, "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" }, "neo-async": { "version": "2.6.1", @@ -6458,6 +6791,11 @@ "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz", "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==" }, + "object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==" + }, "object-keys": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", @@ -6939,7 +7277,7 @@ "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" }, "path-type": { "version": "1.1.0", @@ -7029,6 +7367,12 @@ "split": "^1.0.0" } }, + "picocolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", + "dev": true + }, "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", @@ -7087,6 +7431,24 @@ "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, + "postcss": { + "version": "7.0.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", + "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", + "dev": true, + "requires": { + "picocolors": "^0.2.1", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "postgres-array": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", @@ -7162,12 +7524,12 @@ "integrity": "sha512-Fx65lf9/YDn3hUX08XUc0J8rSux36rEsyiv21ZGUC1mOyeM3lTRpZLcrm8aAolzS4itwVfm7TAPyxC2E5zd6xg==" }, "proxy-addr": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", - "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.9.0" + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" } }, "proxy-agent": { @@ -7698,41 +8060,86 @@ } }, "send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", "requires": { "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", + "depd": "2.0.0", + "destroy": "1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "~1.7.2", + "http-errors": "2.0.0", "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", + "ms": "2.1.3", + "on-finished": "2.4.1", "range-parser": "~1.2.1", - "statuses": "~1.5.0" + "statuses": "2.0.1" }, "dependencies": { + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, + "http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "requires": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "requires": { + "ee-first": "1.1.1" + } + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" } } }, "serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.17.1" + "send": "0.18.0" } }, "set-blocking": { @@ -7740,6 +8147,26 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, + "set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "requires": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "dependencies": { + "function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" + } + } + }, "set-immediate-shim": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", @@ -7805,6 +8232,17 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" }, + "side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "requires": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + } + }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", @@ -8739,7 +9177,7 @@ "strip-bom-string": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", - "integrity": "sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI=", + "integrity": "sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==", "dev": true }, "strip-dirs": { @@ -9326,6 +9764,12 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -9807,7 +10251,7 @@ "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" }, "uuid": { "version": "3.3.2", diff --git a/api/api_sources/package.json b/api/api_sources/package.json index 3adf131f6..d999fb9c1 100644 --- a/api/api_sources/package.json +++ b/api/api_sources/package.json @@ -86,7 +86,7 @@ "chalk": "^2.4.2", "cors": "^2.8.5", "csvtojson": "^2.0.8", - "express": "^4.17.1", + "express": "^4.19.2", "express-validator": "^6.1.1", "form-data": "^3.0.0", "js-yaml": "^3.13.1", diff --git a/api/api_sources/resources/csv/AdultMusselsLocationCode.csv b/api/api_sources/resources/csv/AdultMusselsLocationCode.csv index 7228fd715..2cfffb0d6 100644 --- a/api/api_sources/resources/csv/AdultMusselsLocationCode.csv +++ b/api/api_sources/resources/csv/AdultMusselsLocationCode.csv @@ -14,3 +14,4 @@ Trailer Anchor/Ropes/Chains/fenders Equipment lockers Other +Bilge \ No newline at end of file diff --git a/api/api_sources/resources/csv/PreviousAISKnowledgeSourceCode.csv b/api/api_sources/resources/csv/PreviousAISKnowledgeSourceCode.csv index 305e4f54f..58d7c1fa2 100644 --- a/api/api_sources/resources/csv/PreviousAISKnowledgeSourceCode.csv +++ b/api/api_sources/resources/csv/PreviousAISKnowledgeSourceCode.csv @@ -19,3 +19,4 @@ Previous Inspection in BC Previous Inspection in AB Previous Inspection (other) US/Canada Border Inspection +Parks Canada diff --git a/api/api_sources/resources/csv/PreviousInspectionSourceCode.csv b/api/api_sources/resources/csv/PreviousInspectionSourceCode.csv index 2b089d408..5472f92a7 100644 --- a/api/api_sources/resources/csv/PreviousInspectionSourceCode.csv +++ b/api/api_sources/resources/csv/PreviousInspectionSourceCode.csv @@ -89,3 +89,8 @@ Washington West Virginia* Wisconsin* Wyoming +Jasper National Park +Kootenay National Park +Lake Minnewanka (Banff National Park) +Waterton Lakes National Park +Yoho National Park diff --git a/api/api_sources/resources/csv/WaterBodyFebruary2022.csv b/api/api_sources/resources/csv/WaterBodyFebruary2022.csv new file mode 100644 index 000000000..9f1f2fbe9 --- /dev/null +++ b/api/api_sources/resources/csv/WaterBodyFebruary2022.csv @@ -0,0 +1,2 @@ +water_body_name,water_body_longitude,water_body_latitude,country_code,province_code,closest_city,distance +St. Lawrence River,-69.716553,47.68725,CAN,QC,Quebec City,150 diff --git a/api/api_sources/resources/jsons/musselsApp/DaysSincePreviousInspection.json b/api/api_sources/resources/jsons/musselsApp/DaysSincePreviousInspection.json new file mode 100644 index 000000000..d32d86f36 --- /dev/null +++ b/api/api_sources/resources/jsons/musselsApp/DaysSincePreviousInspection.json @@ -0,0 +1,14 @@ +[ + { + "Days_Since_Previous_Inspection": "Same day" + }, + { + "Days_Since_Previous_Inspection": "< 30 days" + }, + { + "Days_Since_Previous_Inspection": "> 30 days" + }, + { + "Days_Since_Previous_Inspection": "> 1 year" + } +] \ No newline at end of file diff --git a/api/api_sources/resources/jsons/musselsApp/K9InspectionResults.json b/api/api_sources/resources/jsons/musselsApp/K9InspectionResults.json new file mode 100644 index 000000000..cb71ef380 --- /dev/null +++ b/api/api_sources/resources/jsons/musselsApp/K9InspectionResults.json @@ -0,0 +1,8 @@ +[ + { + "K9_Inspection_Results": "k9 detected/indicated" + }, + { + "K9_Inspection_Results": "k9 did not indicate" + } +] \ No newline at end of file diff --git a/api/api_sources/resources/jsons/musselsApp/MusselStationNames.json b/api/api_sources/resources/jsons/musselsApp/MusselStationNames.json index 1a0d6f9d8..8f388502b 100644 --- a/api/api_sources/resources/jsons/musselsApp/MusselStationNames.json +++ b/api/api_sources/resources/jsons/musselsApp/MusselStationNames.json @@ -17,6 +17,9 @@ { "Station_Name": "Keremeos (Hwy 3)" }, + { + "Station_Name": "Kootenay Sgt" + }, { "Station_Name": "Midway" }, @@ -26,6 +29,9 @@ { "Station_Name": "Olsen (Hwy 3)" }, + { + "Station_Name": "Okanagan Sgt" + }, { "Station_Name": "Osoyoos" }, @@ -41,6 +47,9 @@ { "Station_Name": "Radium" }, + { + "Station_Name": "Rocky Mountain Sgt" + }, { "Station_Name": "Scheduled Inspection (AB notification)" }, diff --git a/api/api_sources/schema-files/blowBy.schema.yaml b/api/api_sources/schema-files/blowBy.schema.yaml new file mode 100644 index 000000000..11c033e43 --- /dev/null +++ b/api/api_sources/schema-files/blowBy.schema.yaml @@ -0,0 +1,54 @@ +version: '1.0' +description: Schema file for table blow_by +externalTables: [] +includes: + - observerWorkflow.schema.yaml +schemas: + BlowBySchema: + name: blow_by + description: 'Table to store blow by data for watercraft observer.' + baseSchema: RecordSchema + meta: + resource: true + api: /mussels/blow-bys + base: api + resource: true + baseModel: Record + columns: + id: + name: blow_by_id + comment: Auto generated primary key + definition: SERIAL PRIMARY KEY + observerWorkflowId: + name: observer_workflow_id + comment: Foreign key to observer_workflow + definition: INT NULL + foreignTable: observer_workflow + refColumn: observer_workflow_id + blowByTime: + name: blow_by_time + comment: Time of blow by + definition: TIMESTAMP NULL + watercraftComplexity: + name: watercraft_complexity + comment: Watercraft complexity + definition: VARCHAR(100) NULL + reportedToRapp: + name: reported_to_rapp + comment: Reported to rapp + definition: BOOLEAN NOT NULL DEFAULT false + relations: + observerWorkflow: + header: + key: blow_by.observer_workflow + default: Observer Workflow + description: + key: blow_by.observer_workflow.description + default: Observer workflow associated with the blow by + type: single + relationshipType: many-to-one + schema: ObserverWorkflowSchema + meta: + skipValidation: true + versions: [] + fields: {} diff --git a/api/api_sources/schema-files/highRiskAssessment.schema.yaml b/api/api_sources/schema-files/highRiskAssessment.schema.yaml index 614be56e5..276a4a553 100644 --- a/api/api_sources/schema-files/highRiskAssessment.schema.yaml +++ b/api/api_sources/schema-files/highRiskAssessment.schema.yaml @@ -104,5 +104,65 @@ schemas: deleteCascade: false required: false meta: {} - versions: [] + versions: + ## -- version: multiple locations + - name: 'addMultipleLocations' + id: '20230407' + info: 'Adding multiple locations' + columns: + standingWaterLocation1: + name: standing_water_location_code_id_1 + comment: Foreign key reference to code table (named adult_mussels_location_code) of possible locations on watercraft where standing water or adult mussels may be found. This field is specifically for locations of standing water + definition: INT NULL + foreignTable: adult_mussels_location_code + refColumn: adult_mussels_location_code_id + deleteCascade: false + required: false + meta: {} + standingWaterLocation2: + name: standing_water_location_code_id_2 + comment: Foreign key reference to code table (named adult_mussels_location_code) of possible locations on watercraft where standing water or adult mussels may be found. This field is specifically for locations of standing water + definition: INT NULL + foreignTable: adult_mussels_location_code + refColumn: adult_mussels_location_code_id + deleteCascade: false + required: false + meta: {} + standingWaterLocation3: + name: standing_water_location_code_id_3 + comment: Foreign key reference to code table (named adult_mussels_location_code) of possible locations on watercraft where standing water or adult mussels may be found. This field is specifically for locations of standing water + definition: INT NULL + foreignTable: adult_mussels_location_code + refColumn: adult_mussels_location_code_id + deleteCascade: false + required: false + meta: {} + adultDreissenidaeMusselDetail1: + name: adult_mussels_location_code_id_1 + comment: Foreign key reference to code table (named adult_mussels_location_code) of possible locations on watercraft where standing water or adult mussels may be found. This field is specifically for locations where adult mussels were found on the watercraft + definition: INT NULL + foreignTable: adult_mussels_location_code + refColumn: adult_mussels_location_code_id + deleteCascade: false + required: false + meta: {} + adultDreissenidaeMusselDetail2: + name: adult_mussels_location_code_id_2 + comment: Foreign key reference to code table (named adult_mussels_location_code) of possible locations on watercraft where standing water or adult mussels may be found. This field is specifically for locations where adult mussels were found on the watercraft + definition: INT NULL + foreignTable: adult_mussels_location_code + refColumn: adult_mussels_location_code_id + deleteCascade: false + required: false + meta: {} + adultDreissenidaeMusselDetail3: + name: adult_mussels_location_code_id_3 + comment: Foreign key reference to code table (named adult_mussels_location_code) of possible locations on watercraft where standing water or adult mussels may be found. This field is specifically for locations where adult mussels were found on the watercraft + definition: INT NULL + foreignTable: adult_mussels_location_code + refColumn: adult_mussels_location_code_id + deleteCascade: false + required: false + meta: {} + ## -- end: multiple locations fields: {} diff --git a/api/api_sources/schema-files/majorCities.schema.yaml b/api/api_sources/schema-files/majorCities.schema.yaml index dbed00933..56a9c387d 100644 --- a/api/api_sources/schema-files/majorCities.schema.yaml +++ b/api/api_sources/schema-files/majorCities.schema.yaml @@ -71,21 +71,7 @@ schemas: name: active comment: Boolean flag to check, the record is active or not. definition: BOOLEAN NOT NULL DEFAULT TRUE - # ## -- columns - # imports: - # init: - # fileName: MajorCities.csv - # allColumnsExcept: - # - active - # ocean: - # fileName: WaterBodyOcean.csv - # allColumnsExcept: - # - active - # june2020: - # fileName: WaterBodiesJune2020.csv - # allColumnsExcept: - # - active - # ## -- + ## -- diff --git a/api/api_sources/schema-files/watercraftRiskAssessment.schema.yaml b/api/api_sources/schema-files/watercraftRiskAssessment.schema.yaml index 122ca4fc8..3b729969f 100644 --- a/api/api_sources/schema-files/watercraftRiskAssessment.schema.yaml +++ b/api/api_sources/schema-files/watercraftRiskAssessment.schema.yaml @@ -133,6 +133,10 @@ schemas: name: commercial_manufacturer_as_destination_water_body_ind comment: Boolean indicate that watercraft''s destination water body is commercial manufacturer definition: BOOLEAN NOT NULL DEFAULT FALSE + dreissenidMusselsFoundPrevious: + name: dreissenid_mussels_found_previous + comment: 'Status flag to check if dreissenid mussels were found on the previous inspection or not' + definition: BOOLEAN NOT NULL DEFAULT FALSE # Counter nonMotorized: name: 'non_motorized_counter' @@ -152,8 +156,9 @@ schemas: definition: INT NULL previousInspectionDays: name: 'previous_inspection_days_count' - comment: 'Counter for number of very complex boats in the inspection' - definition: INT NULL + comment: 'Number of days the previous inspection was conducted' + definition: VARCHAR(100) NULL + required: false # Strings generalComment: name: general_comment @@ -253,6 +258,29 @@ schemas: required: false meta: {} ## -- end: numberOfPeopleInParty + ## -- version: inspectionTime + - name: 'inspectionTime' + id: '20210706' + info: 'Adding new column inspectionTime' + columns: + inspectionTime: + name: inspection_time + comment: The time of the inspection + definition: VARCHAR(100) NULL + required: false + meta: {} + ## -- end: inspectionTime + ## -- version: k9InspectionResults + - name: 'k9InspectionResults' + id: '20230330' + info: 'Adding new column k9InspectionResults' + columns: + k9InspectionResults: + name: k9_inspection_results + comment: 'result of k9 inspection' + definition: VARCHAR(100) NULL + required: false + ## -- end: k9InspectionResults ## -- end version ## -- diff --git a/api/api_sources/schema-migration-sql/AdultMusselsLocationSchema/AdultMusselsLocationSchema-init.sql b/api/api_sources/schema-migration-sql/AdultMusselsLocationSchema/AdultMusselsLocationSchema-init.sql index 181656460..28e2a0b37 100644 --- a/api/api_sources/schema-migration-sql/AdultMusselsLocationSchema/AdultMusselsLocationSchema-init.sql +++ b/api/api_sources/schema-migration-sql/AdultMusselsLocationSchema/AdultMusselsLocationSchema-init.sql @@ -74,3 +74,8 @@ INSERT INTO adult_mussels_location_code(description) VALUES ('Other'); -- ## End of item: 14 ## -- +-- ## Inserting Item: 15 ## -- +INSERT INTO adult_mussels_location_code(description) +VALUES +('Bilge'); +-- ## End of item: 15 ## -- \ No newline at end of file diff --git a/api/api_sources/schema-migration-sql/BlowBySchema/BlowBySchema.sql b/api/api_sources/schema-migration-sql/BlowBySchema/BlowBySchema.sql new file mode 100644 index 000000000..bb5f95be0 --- /dev/null +++ b/api/api_sources/schema-migration-sql/BlowBySchema/BlowBySchema.sql @@ -0,0 +1,41 @@ +-- ### Creating Table: blow_by ### -- + + +CREATE TABLE blow_by (); +ALTER TABLE blow_by ADD COLUMN blow_by_id SERIAL PRIMARY KEY; +ALTER TABLE blow_by ADD COLUMN observer_workflow_id INT NULL REFERENCES observer_workflow(observer_workflow_id) ON DELETE SET NULL; +ALTER TABLE blow_by ADD COLUMN blow_by_time TIMESTAMP NULL; +ALTER TABLE blow_by ADD COLUMN watercraft_complexity VARCHAR(100) NULL; +ALTER TABLE blow_by ADD COLUMN reported_to_rapp BOOLEAN NOT NULL DEFAULT false; + + + +-- ### Creating Comments on table ### -- + + +COMMENT ON TABLE blow_by IS 'Table to store blow by data for watercraft observer.'; +COMMENT ON COLUMN blow_by.blow_by_id IS 'Auto generated primary key'; +COMMENT ON COLUMN blow_by.observer_workflow_id IS 'Foreign key to observer_workflow'; +COMMENT ON COLUMN blow_by.blow_by_time IS 'Time of blow by'; +COMMENT ON COLUMN blow_by.watercraft_complexity IS 'Watercraft complexity'; +COMMENT ON COLUMN blow_by.reported_to_rapp IS 'Reported to rapp'; + + + +-- ### Creating Timestamp column ### -- + + +ALTER TABLE blow_by ADD COLUMN created_at TIMESTAMP DEFAULT NOW(); +ALTER TABLE blow_by ADD COLUMN updated_at TIMESTAMP DEFAULT NOW(); +COMMENT ON COLUMN blow_by.created_at IS 'Timestamp column to check creation time of record'; +COMMENT ON COLUMN blow_by.updated_at IS 'Timestamp column to check modify time of record'; + + +-- ### Creating User Audit Columns ### -- + + +ALTER TABLE blow_by ADD COLUMN updated_by_user_id INT NULL DEFAULT NULL REFERENCES application_user(user_id) ON DELETE SET NULL; +ALTER TABLE blow_by ADD COLUMN created_by_user_id INT NULL DEFAULT NULL REFERENCES application_user(user_id) ON DELETE SET NULL; +COMMENT ON COLUMN blow_by.updated_by_user_id IS 'Audit column to track creator'; +COMMENT ON COLUMN blow_by.created_by_user_id IS 'Audit column to track modifier'; + -- ### End: blow_by ### -- diff --git a/api/api_sources/schema-migration-sql/HighRiskAssessmentSchema/HighRiskAssessmentSchema-addMultipleLocations-20230407.down.sql b/api/api_sources/schema-migration-sql/HighRiskAssessmentSchema/HighRiskAssessmentSchema-addMultipleLocations-20230407.down.sql new file mode 100644 index 000000000..dbfffa4c9 --- /dev/null +++ b/api/api_sources/schema-migration-sql/HighRiskAssessmentSchema/HighRiskAssessmentSchema-addMultipleLocations-20230407.down.sql @@ -0,0 +1,12 @@ +-- ## Reverting table: high_risk_assessment +-- ## Version: addMultipleLocations +-- ## Info: Adding addMultipleLocations +-- ## Removing New Columns ## -- +ALTER TABLE high_risk_assessment DROP COLUMN IF EXISTS standing_water_location_code_id_1; +ALTER TABLE high_risk_assessment DROP COLUMN IF EXISTS standing_water_location_code_id_2; +ALTER TABLE high_risk_assessment DROP COLUMN IF EXISTS standing_water_location_code_id_3; +ALTER TABLE high_risk_assessment DROP COLUMN IF EXISTS adult_mussels_location_code_id_1; +ALTER TABLE high_risk_assessment DROP COLUMN IF EXISTS adult_mussels_location_code_id_2; +ALTER TABLE high_risk_assessment DROP COLUMN IF EXISTS adult_mussels_location_code_id_3; + +-- ## Updating high_risk_assessment ## -- diff --git a/api/api_sources/schema-migration-sql/HighRiskAssessmentSchema/HighRiskAssessmentSchema-addMultipleLocations-20230407.up.sql b/api/api_sources/schema-migration-sql/HighRiskAssessmentSchema/HighRiskAssessmentSchema-addMultipleLocations-20230407.up.sql new file mode 100644 index 000000000..175b304af --- /dev/null +++ b/api/api_sources/schema-migration-sql/HighRiskAssessmentSchema/HighRiskAssessmentSchema-addMultipleLocations-20230407.up.sql @@ -0,0 +1,42 @@ +-- ## Changing table: high_risk_assessment +-- ## Version: addMultipleLocations +-- ## Info: Adding addMultipleLocations +-- ## Adding New Columns ## -- + +-- ## Adding Column standing_water_location_code_id_1 on table high_risk_assessment +ALTER TABLE high_risk_assessment ADD COLUMN standing_water_location_code_id_1 INT NULL REFERENCES adult_mussels_location_code(adult_mussels_location_code_id) ON DELETE SET NULL; +COMMENT ON COLUMN high_risk_assessment.standing_water_location_code_id_1 IS 'Foreign key reference to code table (named adult_mussels_location_code) of possible locations on watercraft where standing water or adult mussels may be found. This field is specifically for locations of standing water'; +-- ## -- + + +-- ## Adding Column standing_water_location_code_id_2 on table high_risk_assessment +ALTER TABLE high_risk_assessment ADD COLUMN standing_water_location_code_id_2 INT NULL REFERENCES adult_mussels_location_code(adult_mussels_location_code_id) ON DELETE SET NULL; +COMMENT ON COLUMN high_risk_assessment.standing_water_location_code_id_2 IS 'Foreign key reference to code table (named adult_mussels_location_code) of possible locations on watercraft where standing water or adult mussels may be found. This field is specifically for locations of standing water'; +-- ## -- + + +-- ## Adding Column standing_water_location_code_id_3 on table high_risk_assessment +ALTER TABLE high_risk_assessment ADD COLUMN standing_water_location_code_id_3 INT NULL REFERENCES adult_mussels_location_code(adult_mussels_location_code_id) ON DELETE SET NULL; +COMMENT ON COLUMN high_risk_assessment.standing_water_location_code_id_3 IS 'Foreign key reference to code table (named adult_mussels_location_code) of possible locations on watercraft where standing water or adult mussels may be found. This field is specifically for locations of standing water'; +-- ## -- + + +-- ## Adding Column adult_mussels_location_code_id_1 on table high_risk_assessment +ALTER TABLE high_risk_assessment ADD COLUMN adult_mussels_location_code_id_1 INT NULL REFERENCES adult_mussels_location_code(adult_mussels_location_code_id) ON DELETE SET NULL; +COMMENT ON COLUMN high_risk_assessment.adult_mussels_location_code_id_1 IS 'Foreign key reference to code table (named adult_mussels_location_code) of possible locations on watercraft where standing water or adult mussels may be found. This field is specifically for locations where adult mussels were found on the watercraft'; +-- ## -- + + +-- ## Adding Column adult_mussels_location_code_id_2 on table high_risk_assessment +ALTER TABLE high_risk_assessment ADD COLUMN adult_mussels_location_code_id_2 INT NULL REFERENCES adult_mussels_location_code(adult_mussels_location_code_id) ON DELETE SET NULL; +COMMENT ON COLUMN high_risk_assessment.adult_mussels_location_code_id_2 IS 'Foreign key reference to code table (named adult_mussels_location_code) of possible locations on watercraft where standing water or adult mussels may be found. This field is specifically for locations where adult mussels were found on the watercraft'; +-- ## -- + + +-- ## Adding Column adult_mussels_location_code_id_3 on table high_risk_assessment +ALTER TABLE high_risk_assessment ADD COLUMN adult_mussels_location_code_id_3 INT NULL REFERENCES adult_mussels_location_code(adult_mussels_location_code_id) ON DELETE SET NULL; +COMMENT ON COLUMN high_risk_assessment.adult_mussels_location_code_id_3 IS 'Foreign key reference to code table (named adult_mussels_location_code) of possible locations on watercraft where standing water or adult mussels may be found. This field is specifically for locations where adult mussels were found on the watercraft'; +-- ## -- + + +-- ## Updating high_risk_assessment ## -- diff --git a/api/api_sources/schema-migration-sql/MajorCitySchema/MajorCitySchema-init.sql b/api/api_sources/schema-migration-sql/MajorCitySchema/MajorCitySchema-init.sql new file mode 100644 index 000000000..5972c6589 --- /dev/null +++ b/api/api_sources/schema-migration-sql/MajorCitySchema/MajorCitySchema-init.sql @@ -0,0 +1,1980 @@ +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Airdrie (Alberta CAN)','Airdrie',-114.009030,51.289940,'CAN','Alberta',' CA-AB ',' Highwood River ',85.8,NULL,NULL,'','',true), + ('Athabasca (Alberta CAN)','Athabasca',-113.310190,54.696150,'CAN','Alberta',' CA-AB ',' Calling River ',54.7,NULL,NULL,'','',true), + ('Banff (Alberta CAN)','Banff',-115.558710,51.288700,'CAN','Alberta',' CA-AB ',' Rock Isle Lake ',29.6,NULL,NULL,'','',true), + ('Barrhead (Alberta CAN)','Barrhead',-114.366340,54.158350,'CAN','Alberta',' CA-AB ',' Lac Ste Anne ',49.7,NULL,NULL,'','',true), + ('Bonnyville (Alberta CAN)','Bonnyville',-110.781010,54.283500,'CAN','Alberta',' CA-AB ',' Frog Lake ',50.2,NULL,NULL,'','',true), + ('Brooks (Alberta CAN)','Brooks',-111.879560,50.522690,'CAN','Alberta',' CA-AB ',' Berry Creek ',84.6,NULL,NULL,'','',true), + ('Calgary (Alberta CAN)','Calgary',-114.126670,51.039460,'CAN','Alberta',' CA-AB ',' Highwood River ',56.8,NULL,NULL,'','',true), + ('Camrose (Alberta CAN)','Camrose',-112.843210,53.027650,'CAN','Alberta',' CA-AB ',' North Saskatchewan ',33.0,NULL,NULL,'','',true), + ('Cardston (Alberta CAN)','Cardston',-113.292820,49.172960,'CAN','Alberta',' CA-AB ',' St Mary Reservoir ',16.8,NULL,NULL,'','',true), + ('Claresholm (Alberta CAN)','Claresholm',-113.618440,50.025120,'CAN','Alberta',' CA-AB ',' Oldman River ',34.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Cold Lake (Alberta CAN)','Cold Lake',-110.155820,54.428340,'CAN','Alberta',' CA-AB ',' Beaver ',26.0,NULL,NULL,'','',true), + ('Crowsnest Pass (Alberta CAN)','Crowsnest Pass',-114.624590,49.622690,'CAN','Alberta',' CA-AB ',' Phillipps Lake ',3.5,NULL,NULL,'','',true), + ('Drayton Valley (Alberta CAN)','Drayton Valley',-114.972770,53.308780,'CAN','Alberta',' CA-AB ',' Lobstick River ',38.1,NULL,NULL,'','',true), + ('Drumheller (Alberta CAN)','Drumheller',-112.708590,51.480330,'CAN','Alberta',' CA-AB ',' Sullivan Lake ',79.6,NULL,NULL,'','',true), + ('Edmonton (Alberta CAN)','Edmonton',-113.520980,53.584690,'CAN','Alberta',' CA-AB ',' Beaverhill Creek ',57.8,NULL,NULL,'','',true), + ('Edson (Alberta CAN)','Edson',-116.384110,53.620460,'CAN','Alberta',' CA-AB ',' McLeod River ',28.6,NULL,NULL,'','',true), + ('Fairview (Alberta CAN)','Fairview',-118.333170,56.060480,'CAN','Alberta',' CA-AB ',' Notikewin River ',103.6,NULL,NULL,'','',true), + ('Fort Chipewyan (Alberta CAN)','Fort Chipewyan',-111.080500,58.775460,'CAN','Alberta',' CA-AB ',' Slave River ',22.4,NULL,NULL,'','',true), + ('Fort Macleod (Alberta CAN)','Fort Macleod',-113.404710,49.712310,'CAN','Alberta',' CA-AB ',' Oldman River ',11.7,NULL,NULL,'','',true), + ('Fort McMurray (Alberta CAN)','Fort McMurray',-111.389750,56.700010,'CAN','Alberta',' CA-AB ',' Loon River ',39.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Fort Vermilion (Alberta CAN)','Fort Vermilion',-116.064040,58.399760,'CAN','Alberta',' CA-AB ',' Ponton River ',39.5,NULL,NULL,'','',true), + ('Fox Creek (Alberta CAN)','Fox Creek',-116.794730,54.390940,'CAN','Alberta',' CA-AB ',' Little Smoky River ',52.2,NULL,NULL,'','',true), + ('Fox Lake (Alberta CAN)','Fox Lake',-114.517080,58.473750,'CAN','Alberta',' CA-AB ',' Wentzel Lake ',63.1,NULL,NULL,'','',true), + ('Grande Cache (Alberta CAN)','Grande Cache',-119.117360,53.858980,'CAN','Alberta',' CA-AB ',' Kakwa River ',49.7,NULL,NULL,'','',true), + ('Grande Prairie (Alberta CAN)','Grande Prairie',-118.830320,55.218790,'CAN','Alberta',' CA-AB ',' Smoky River ',50.8,NULL,NULL,'','',true), + ('Hanna (Alberta CAN)','Hanna',-111.999770,51.700070,'CAN','Alberta',' CA-AB ',' Sullivan Lake ',36.7,NULL,NULL,'','',true), + ('High Level (Alberta CAN)','High Level',-117.226720,58.587710,'CAN','Alberta',' CA-AB ',' Ponton River ',68.1,NULL,NULL,'','',true), + ('High Prairie (Alberta CAN)','High Prairie',-116.474970,55.436070,'CAN','Alberta',' CA-AB ',' Snipe Lake ',38.1,NULL,NULL,'','',true), + ('High River (Alberta CAN)','High River',-113.868330,50.619550,'CAN','Alberta',' CA-AB ',' Highwood River ',35.4,NULL,NULL,'','',true), + ('Hinton (Alberta CAN)','Hinton',-117.635720,53.334430,'CAN','Alberta',' CA-AB ',' McLeod River ',62.2,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Innisfail (Alberta CAN)','Innisfail',-113.845750,52.062990,'CAN','Alberta',' CA-AB ',' Blindman River ',39.8,NULL,NULL,'','',true), + ('Jasper (Alberta CAN)','Jasper',-118.130300,52.917620,'CAN','Alberta',' CA-AB ',' Portal Lake ',22.0,NULL,NULL,'','',true), + ('La Crete (Alberta CAN)','La Crete',-116.477880,58.233150,'CAN','Alberta',' CA-AB ',' Ponton River ',62.1,NULL,NULL,'','',true), + ('Lac La Biche (Alberta CAN)','Lac La Biche',-111.986580,54.775110,'CAN','Alberta',' CA-AB ',' Lac la Biche ',10.2,NULL,NULL,'','',true), + ('Lacombe (Alberta CAN)','Lacombe',-113.697820,52.527410,'CAN','Alberta',' CA-AB ',' Clearwater River ',19.7,NULL,NULL,'','',true), + ('Leduc (Alberta CAN)','Leduc',-113.529430,53.306880,'CAN','Alberta',' CA-AB ',' Beaverhill Creek ',72.8,NULL,NULL,'','',true), + ('Lethbridge (Alberta CAN)','Lethbridge',-112.769910,49.709840,'CAN','Alberta',' CA-AB ',' Oldman River ',39.6,NULL,NULL,'','',true), + ('Lloydminster (Alberta CAN)','Lloydminster',-110.050420,53.286570,'CAN','Alberta',' CA-AB ',' Frog Lake ',72.9,NULL,NULL,'','',true), + ('Manning (Alberta CAN)','Manning',-117.667900,56.908700,'CAN','Alberta',' CA-AB ',' Notikewin River ',42.2,NULL,NULL,'','',true), + ('Medicine Hat (Alberta CAN)','Medicine Hat',-110.650860,50.025400,'CAN','Alberta',' CA-AB ',' Pakowki Lake ',82.5,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Milk River (Alberta CAN)','Milk River',-112.081950,49.112940,'CAN','Alberta',' CA-AB ',' Cut Bank Creek ',60.5,NULL,NULL,'','',true), + ('Oyen (Alberta CAN)','Oyen',-110.502590,51.338270,'CAN','Alberta',' CA-AB ',' South Saskatchewan ',39.7,NULL,NULL,'','',true), + ('Peace River (Alberta CAN)','Peace River',-117.270870,56.242360,'CAN','Alberta',' CA-AB ',' Cadotte River ',46.6,NULL,NULL,'','',true), + ('Pincher Creek (Alberta CAN)','Pincher Creek',-113.892320,49.466820,'CAN','Alberta',' CA-AB ',' Belly River ',34.8,NULL,NULL,'','',true), + ('Ponoka (Alberta CAN)','Ponoka',-113.548380,52.746080,'CAN','Alberta',' CA-AB ',' Clearwater River ',12.1,NULL,NULL,'','',true), + ('Provost (Alberta CAN)','Provost',-110.144910,52.360830,'CAN','Alberta',' CA-AB ',' Ribstone Creek ',46.4,NULL,NULL,'','',true), + ('Rainbow Lake (Alberta CAN)','Rainbow Lake',-119.364900,58.498040,'CAN','Alberta',' CA-AB ',' Little Hay River ',39.9,NULL,NULL,'','',true), + ('Red Deer (Alberta CAN)','Red Deer',-113.786280,52.271540,'CAN','Alberta',' CA-AB ',' Blindman River ',20.2,NULL,NULL,'','',true), + ('Rocky Mountain House (Alberta CAN)','Rocky Mountain House',-114.875980,52.421060,'CAN','Alberta',' CA-AB ',' Medicine River ',30.1,NULL,NULL,'','',true), + ('Slave Lake (Alberta CAN)','Slave Lake',-114.681180,55.266040,'CAN','Alberta',' CA-AB ',' Athabasca ',53.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('St Paul (Alberta CAN)','St Paul',-111.260500,54.081630,'CAN','Alberta',' CA-AB ',' Frog Lake ',64.0,NULL,NULL,'','',true), + ('Stettler (Alberta CAN)','Stettler',-112.719880,52.350600,'CAN','Alberta',' CA-AB ',' Buffalo Lake ',19.8,NULL,NULL,'','',true), + ('Swan Hills (Alberta CAN)','Swan Hills',-115.437120,54.762950,'CAN','Alberta',' CA-AB ',' Lesser Slave Lake ',76.6,NULL,NULL,'','',true), + ('Taber (Alberta CAN)','Taber',-112.106690,49.783290,'CAN','Alberta',' CA-AB ',' St Mary River ',82.4,NULL,NULL,'','',true), + ('Valleyview (Alberta CAN)','Valleyview',-117.372210,55.036980,'CAN','Alberta',' CA-AB ',' Little Smoky River ',34.2,NULL,NULL,'','',true), + ('Vegreville (Alberta CAN)','Vegreville',-112.044480,53.507760,'CAN','Alberta',' CA-AB ',' Beaverhill Creek ',47.7,NULL,NULL,'','',true), + ('Vermilion (Alberta CAN)','Vermilion',-110.921180,53.337770,'CAN','Alberta',' CA-AB ',' Battle River ',68.9,NULL,NULL,'','',true), + ('Wabasca (Alberta CAN)','Wabasca',-113.809660,55.991610,'CAN','Alberta',' CA-AB ',' North Wabasca Lake ',9.5,NULL,NULL,'','',true), + ('Wainwright (Alberta CAN)','Wainwright',-110.835470,52.800640,'CAN','Alberta',' CA-AB ',' Ribstone Creek ',29.0,NULL,NULL,'','',true), + ('Westlock (Alberta CAN)','Westlock',-113.843110,54.151400,'CAN','Alberta',' CA-AB ',' Lac Ste Anne ',60.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Wetaskiwin (Alberta CAN)','Wetaskiwin',-113.414860,52.988060,'CAN','Alberta',' CA-AB ',' Clearwater River ',38.4,NULL,NULL,'','',true), + ('Whitecourt (Alberta CAN)','Whitecourt',-115.630170,54.137190,'CAN','Alberta',' CA-AB ',' Chip Lake ',57.7,NULL,NULL,'','',true), + ('100 Mile House (British Columbia CAN)','100 Mile House',-121.295560,51.642780,'CAN','British Columbia',' CA-BC ',' Mud Lake ',1.9,NULL,NULL,'','',true), + ('Abbotsford (British Columbia CAN)','Abbotsford',-122.329170,49.052220,'CAN','British Columbia',' CA-BC ',' Mill Lake ',1.6,NULL,NULL,'','',true), + ('Alert Bay (British Columbia CAN)','Alert Bay',-126.927780,50.583890,'CAN','British Columbia',' CA-BC ',' Nimpkish River ',4.3,NULL,NULL,'','',true), + ('Anmore (British Columbia CAN)','Anmore',-122.856390,49.314440,'CAN','British Columbia',' CA-BC ',' Buntzen Lake ',1.8,NULL,NULL,'','',true), + ('Armstrong (British Columbia CAN)','Armstrong',-119.196670,50.448330,'CAN','British Columbia',' CA-BC ',' Otter Lake ',6.0,NULL,NULL,'','',true), + ('Ashcroft (British Columbia CAN)','Ashcroft',-121.283610,50.721390,'CAN','British Columbia',' CA-BC ',' Bonaparte River ',2.6,NULL,NULL,'','',true), + ('Barriere (British Columbia CAN)','Barriere',-120.123610,51.179720,'CAN','British Columbia',' CA-BC ',' Barriere River ',1.2,NULL,NULL,'','',true), + ('Belcarra (British Columbia CAN)','Belcarra',-122.915000,49.313610,'CAN','British Columbia',' CA-BC ',' Sasamat Lake ',2.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Bowen Island (British Columbia CAN)','Bowen Island',-123.344170,49.379720,'CAN','British Columbia',' CA-BC ',' Killarney Lake ',1.6,NULL,NULL,'','',true), + ('Burnaby (British Columbia CAN)','Burnaby',-122.972780,49.242780,'CAN','British Columbia',' CA-BC ',' Deer Lake ',0.7,NULL,NULL,'','',true), + ('Burns Lake (British Columbia CAN)','Burns Lake',-125.764440,54.230280,'CAN','British Columbia',' CA-BC ',' Lomond Loch ',1.6,NULL,NULL,'','',true), + ('Cache Creek (British Columbia CAN)','Cache Creek',-121.323330,50.811940,'CAN','British Columbia',' CA-BC ',' McLean Lake ',6.7,NULL,NULL,'','',true), + ('Campbell River (British Columbia CAN)','Campbell River',-125.243610,50.023060,'CAN','British Columbia',' CA-BC ',' Campbell River ',3.0,NULL,NULL,'','',true), + ('Canal Flats (British Columbia CAN)','Canal Flats',-115.808890,50.160280,'CAN','British Columbia',' CA-BC ',' Sun Lake ',4.9,NULL,NULL,'','',true), + ('Castlegar (British Columbia CAN)','Castlegar',-117.666940,49.324440,'CAN','British Columbia',' CA-BC ',' Kootenay River ',1.5,NULL,NULL,'','',true), + ('Central Saanich (British Columbia CAN)','Central Saanich',-123.420830,48.594440,'CAN','British Columbia',' CA-BC ',' Quarry Lake ',4.5,NULL,NULL,'','',true), + ('Chase (British Columbia CAN)','Chase',-119.686110,50.819170,'CAN','British Columbia',' CA-BC ',' Kosta Lake ',3.6,NULL,NULL,'','',true), + ('Chetwynd (British Columbia CAN)','Chetwynd',-121.638330,55.695830,'CAN','British Columbia',' CA-BC ',' Sukunka River ',9.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Chilliwack (British Columbia CAN)','Chilliwack',-121.950830,49.157780,'CAN','British Columbia',' CA-BC ',' Little Chilliwack River ',2.1,NULL,NULL,'','',true), + ('Clearwater (British Columbia CAN)','Clearwater',-120.032500,51.645560,'CAN','British Columbia',' CA-BC ',' Dutch Lake ',1.8,NULL,NULL,'','',true), + ('Clinton (British Columbia CAN)','Clinton',-121.586670,51.091670,'CAN','British Columbia',' CA-BC ',' Duck Lakes ',1.7,NULL,NULL,'','',true), + ('Coldstream (British Columbia CAN)','Coldstream',-119.230000,50.223890,'CAN','British Columbia',' CA-BC ',' Deep Lake ',2.7,NULL,NULL,'','',true), + ('Colwood (British Columbia CAN)','Colwood',-123.493330,48.423610,'CAN','British Columbia',' CA-BC ',' Colwood Lake ',2.1,NULL,NULL,'','',true), + ('Comox (British Columbia CAN)','Comox',-124.927780,49.672780,'CAN','British Columbia',' CA-BC ',' Trent River ',3.2,NULL,NULL,'','',true), + ('Coquitlam (British Columbia CAN)','Coquitlam',-122.793610,49.284170,'CAN','British Columbia',' CA-BC ',' Lafarge Lake ',0.5,NULL,NULL,'','',true), + ('Courtenay (British Columbia CAN)','Courtenay',-124.995830,49.689440,'CAN','British Columbia',' CA-BC ',' Puntledge River ',0.7,NULL,NULL,'','',true), + ('Cranbrook (British Columbia CAN)','Cranbrook',-115.746940,49.508060,'CAN','British Columbia',' CA-BC ',' Sylvan Lake ',2.0,NULL,NULL,'','',true), + ('Creston (British Columbia CAN)','Creston',-116.513060,49.097500,'CAN','British Columbia',' CA-BC ',' Goat River ',3.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Cumberland (British Columbia CAN)','Cumberland',-125.032500,49.618610,'CAN','British Columbia',' CA-BC ',' Teal Lake ',1.8,NULL,NULL,'','',true), + ('Dawson Creek (British Columbia CAN)','Dawson Creek',-120.235560,55.760560,'CAN','British Columbia',' CA-BC ',' McWaters Lake ',16.3,NULL,NULL,'','',true), + ('Digby (Nova Scotia CAN)','Digby',-65.776980,44.600200,'CAN','Nova Scotia',' CA-NS ',' Lake Rossignol ',69.1,NULL,NULL,'','',true), + ('Delta (British Columbia CAN)','Delta',-123.058610,49.084720,'CAN','British Columbia',' CA-BC ',' Fraser River ',10.3,NULL,NULL,'','',true), + ('Duncan (British Columbia CAN)','Duncan',-123.708060,48.778610,'CAN','British Columbia',' CA-BC ',' Somenos Lake ',2.5,NULL,NULL,'','',true), + ('Elkford (British Columbia CAN)','Elkford',-114.921670,50.024440,'CAN','British Columbia',' CA-BC ',' Fording River ',16.1,NULL,NULL,'','',true), + ('Enderby (British Columbia CAN)','Enderby',-119.139440,50.550560,'CAN','British Columbia',' CA-BC ',' Willshore Lake ',6.1,NULL,NULL,'','',true), + ('Esquimalt (British Columbia CAN)','Esquimalt',-123.414440,48.429720,'CAN','British Columbia',' CA-BC ',' Colquitz River ',3.3,NULL,NULL,'','',true), + ('Fernie (British Columbia CAN)','Fernie',-115.062780,49.504170,'CAN','British Columbia',' CA-BC ',' Island Lake ',8.3,NULL,NULL,'','',true), + ('Fort St James (British Columbia CAN)','Fort St James',-124.259170,54.444440,'CAN','British Columbia',' CA-BC ',' Necoslie River ',1.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Fort St John (British Columbia CAN)','Fort St John',-120.846670,56.252500,'CAN','British Columbia',' CA-BC ',' Moberly River ',7.7,NULL,NULL,'','',true), + ('Fraser Lake (British Columbia CAN)','Fraser Lake',-124.843890,54.060280,'CAN','British Columbia',' CA-BC ',' Mudhole Lake ',2.5,NULL,NULL,'','',true), + ('Fruitvale (British Columbia CAN)','Fruitvale',-117.542780,49.115000,'CAN','British Columbia',' CA-BC ',' Kearns Lake ',8.6,NULL,NULL,'','',true), + ('Gibsons (British Columbia CAN)','Gibsons',-123.508890,49.400280,'CAN','British Columbia',' CA-BC ',' Josephine Lake ',10.4,NULL,NULL,'','',true), + ('Gold River (British Columbia CAN)','Gold River',-126.046940,49.781390,'CAN','British Columbia',' CA-BC ',' Heber River ',0.9,NULL,NULL,'','',true), + ('Golden (British Columbia CAN)','Golden',-116.964720,51.297780,'CAN','British Columbia',' CA-BC ',' Kicking Horse River ',1.9,NULL,NULL,'','',true), + ('Grand Forks (British Columbia CAN)','Grand Forks',-118.439170,49.031110,'CAN','British Columbia',' CA-BC ',' Granby River ',0.5,NULL,NULL,'','',true), + ('Granisle (British Columbia CAN)','Granisle',-126.206670,54.884720,'CAN','British Columbia',' CA-BC ',' Fulton River ',8.7,NULL,NULL,'','',true), + ('Greenwood (British Columbia CAN)','Greenwood',-118.676390,49.088330,'CAN','British Columbia',' CA-BC ',' Marshall Lake ',5.9,NULL,NULL,'','',true), + ('Harrison Hot Springs (British Columbia CAN)','Harrison Hot Springs',-121.784440,49.298890,'CAN','British Columbia',' CA-BC ',' Campbell Lake ',2.7,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Hazelton (British Columbia CAN)','Hazelton',-127.675560,55.255830,'CAN','British Columbia',' CA-BC ',' Bulkley River ',1.1,NULL,NULL,'','',true), + ('Highlands (British Columbia CAN)','Highlands',-123.511940,48.480560,'CAN','British Columbia',' CA-BC ',' Matson Lake ',0.7,NULL,NULL,'','',true), + ('Hope (British Columbia CAN)','Hope',-121.441390,49.380000,'CAN','British Columbia',' CA-BC ',' Coquihalla River ',1.5,NULL,NULL,'','',true), + ('Houston (British Columbia CAN)','Houston',-126.648330,54.398330,'CAN','British Columbia',' CA-BC ',' Mathews Lake ',6.1,NULL,NULL,'','',true), + ('Hudsons Hope (British Columbia CAN)','Hudsons Hope',-121.913610,56.025830,'CAN','British Columbia',' CA-BC ',' Rene Lake ',10.2,NULL,NULL,'','',true), + ('Invermere (British Columbia CAN)','Invermere',-116.030560,50.505830,'CAN','British Columbia',' CA-BC ',' Dorothy Lake ',0.9,NULL,NULL,'','',true), + ('Kamloops (British Columbia CAN)','Kamloops',-120.339440,50.675830,'CAN','British Columbia',' CA-BC ',' South Thompson River ',0.5,NULL,NULL,'','',true), + ('Kaslo (British Columbia CAN)','Kaslo',-116.905000,49.910560,'CAN','British Columbia',' CA-BC ',' Kaslo River ',0.7,NULL,NULL,'','',true), + ('Kelowna (British Columbia CAN)','Kelowna',-119.495560,49.888060,'CAN','British Columbia',' CA-BC ',' Okanagan Lake ',3.7,NULL,NULL,'','',true), + ('Kent (British Columbia CAN)','Kent',-121.762500,49.238060,'CAN','British Columbia',' CA-BC ',' Cheam Lake ',5.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Keremeos (British Columbia CAN)','Keremeos',-119.829720,49.204720,'CAN','British Columbia',' CA-BC ',' Ashnola River ',10.6,NULL,NULL,'','',true), + ('Kimberley (British Columbia CAN)','Kimberley',-115.981670,49.685000,'CAN','British Columbia',' CA-BC ',' Elmer Lake ',2.0,NULL,NULL,'','',true), + ('Kitimat (British Columbia CAN)','Kitimat',-128.652220,54.053330,'CAN','British Columbia',' CA-BC ',' Kitimat River ',4.8,NULL,NULL,'','',true), + ('Ladysmith (British Columbia CAN)','Ladysmith',-123.815560,48.993330,'CAN','British Columbia',' CA-BC ',' Heart Lake ',2.9,NULL,NULL,'','',true), + ('Lake Country (British Columbia CAN)','Lake Country',-119.402500,50.030280,'CAN','British Columbia',' CA-BC ',' Ellison Lake ',4.2,NULL,NULL,'','',true), + ('Lake Cowichan (British Columbia CAN)','Lake Cowichan',-124.056390,48.825830,'CAN','British Columbia',' CA-BC ',' Kwassin Lake ',1.5,NULL,NULL,'','',true), + ('Langford (British Columbia CAN)','Langford',-123.504440,48.449720,'CAN','British Columbia',' CA-BC ',' Florence Lake ',1.2,NULL,NULL,'','',true), + ('Langley (British Columbia CAN)','Langley',-122.658060,49.102500,'CAN','British Columbia',' CA-BC ',' Salmon River ',9.8,NULL,NULL,'','',true), + ('Langley (British Columbia CAN)','Langley',-122.659720,49.120280,'CAN','British Columbia',' CA-BC ',' Salmon River ',8.3,NULL,NULL,'','',true), + ('Lantzville (British Columbia CAN)','Lantzville',-124.074440,49.250560,'CAN','British Columbia',' CA-BC ',' Green Lake ',2.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Lillooet (British Columbia CAN)','Lillooet',-121.933610,50.693890,'CAN','British Columbia',' CA-BC ',' Seton River ',1.5,NULL,NULL,'','',true), + ('Lions Bay (British Columbia CAN)','Lions Bay',-123.235280,49.458610,'CAN','British Columbia',' CA-BC ',' Enchantment Lake ',4.9,NULL,NULL,'','',true), + ('Logan Lake (British Columbia CAN)','Logan Lake',-120.813330,50.494440,'CAN','British Columbia',' CA-BC ',' Logan Lake ',0.5,NULL,NULL,'','',true), + ('Lumby (British Columbia CAN)','Lumby',-118.961940,50.250830,'CAN','British Columbia',' CA-BC ',' Rawlings Lake ',6.6,NULL,NULL,'','',true), + ('Lytton (British Columbia CAN)','Lytton',-121.581390,50.231110,'CAN','British Columbia',' CA-BC ',' Thompson River ',0.5,NULL,NULL,'','',true), + ('Mackenzie (British Columbia CAN)','Mackenzie',-123.092780,55.324440,'CAN','British Columbia',' CA-BC ',' Tom and Eunice Lakes ',2.6,NULL,NULL,'','',true), + ('Maple Ridge (British Columbia CAN)','Maple Ridge',-122.598890,49.220000,'CAN','British Columbia',' CA-BC ',' Salmon River ',4.9,NULL,NULL,'','',true), + ('Masset (British Columbia CAN)','Masset',-132.146670,54.011110,'CAN','British Columbia',' CA-BC ',' Hancock River ',4.1,NULL,NULL,'','',true), + ('McBride (British Columbia CAN)','McBride',-120.163890,53.304170,'CAN','British Columbia',' CA-BC ',' Horseshoe Lake ',2.0,NULL,NULL,'','',true), + ('Merritt (British Columbia CAN)','Merritt',-120.788330,50.112500,'CAN','British Columbia',' CA-BC ',' Coldwater River ',1.2,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Metchosin (British Columbia CAN)','Metchosin',-123.535830,48.379170,'CAN','British Columbia',' CA-BC ',' Blinkhorn Lake ',3.1,NULL,NULL,'','',true), + ('Midway (British Columbia CAN)','Midway',-118.778330,49.008330,'CAN','British Columbia',' CA-BC ',' Davis Lake ',12.9,NULL,NULL,'','',true), + ('Mission (British Columbia CAN)','Mission',-122.283890,49.159170,'CAN','British Columbia',' CA-BC ',' Hatzic Lake ',3.2,NULL,NULL,'','',true), + ('Montrose (British Columbia CAN)','Montrose',-117.594170,49.078890,'CAN','British Columbia',' CA-BC ',' Pend dOreille River ',8.5,NULL,NULL,'','',true), + ('Nakusp (British Columbia CAN)','Nakusp',-117.797500,50.239170,'CAN','British Columbia',' CA-BC ',' Twin Lakes ',2.3,NULL,NULL,'','',true), + ('Nanaimo (British Columbia CAN)','Nanaimo',-123.938060,49.163890,'CAN','British Columbia',' CA-BC ',' Millstone River ',1.0,NULL,NULL,'','',true), + ('Nelson (British Columbia CAN)','Nelson',-117.295830,49.493330,'CAN','British Columbia',' CA-BC ',' Cottonwood Lake ',7.8,NULL,NULL,'','',true), + ('New Denver (British Columbia CAN)','New Denver',-117.377220,49.991390,'CAN','British Columbia',' CA-BC ',' Hoben Lakes ',9.0,NULL,NULL,'','',true), + ('New Hazelton (British Columbia CAN)','New Hazelton',-127.586940,55.243330,'CAN','British Columbia',' CA-BC ',' Ross Lake ',4.5,NULL,NULL,'','',true), + ('New Westminster (British Columbia CAN)','New Westminster',-122.910560,49.206670,'CAN','British Columbia',' CA-BC ',' Brunette River ',2.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('North Cowichan (British Columbia CAN)','North Cowichan',-123.719720,48.824720,'CAN','British Columbia',' CA-BC ',' Sollys Lake ',2.8,NULL,NULL,'','',true), + ('North Saanich (British Columbia CAN)','North Saanich',-123.432220,48.656390,'CAN','British Columbia',' CA-BC ',' Hutchinson Lake ',10.5,NULL,NULL,'','',true), + ('North Vancouver (British Columbia CAN)','North Vancouver',-123.073890,49.320560,'CAN','British Columbia',' CA-BC ',' Seymour River ',4.1,NULL,NULL,'','',true), + ('North Vancouver (British Columbia CAN)','North Vancouver',-123.078060,49.336110,'CAN','British Columbia',' CA-BC ',' Capilano River ',4.7,NULL,NULL,'','',true), + ('Northern Rockies Regional Municipality (British Columbia CAN)','Northern Rockies Regional Municipality',-122.706670,58.803890,'CAN','British Columbia',' CA-BC ',' Prophet River ',5.0,NULL,NULL,'','',true), + ('Oak Bay (British Columbia CAN)','Oak Bay',-123.318060,48.425830,'CAN','British Columbia',' CA-BC ',' Goodacre Lake ',3.7,NULL,NULL,'','',true), + ('Oliver (British Columbia CAN)','Oliver',-119.550830,49.182500,'CAN','British Columbia',' CA-BC ',' Tugulnuit Lake ',1.9,NULL,NULL,'','',true), + ('Osoyoos (British Columbia CAN)','Osoyoos',-119.468330,49.032500,'CAN','British Columbia',' CA-BC ',' Peanut Lake ',0.3,NULL,NULL,'','',true), + ('Parksville (British Columbia CAN)','Parksville',-124.311390,49.318060,'CAN','British Columbia',' CA-BC ',' Englishman River ',1.7,NULL,NULL,'','',true), + ('Peachland (British Columbia CAN)','Peachland',-119.736390,49.773890,'CAN','British Columbia',' CA-BC ',' McCall Lakes ',3.6,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Pemberton (British Columbia CAN)','Pemberton',-122.807780,50.320560,'CAN','British Columbia',' CA-BC ',' One Mile Lake ',1.1,NULL,NULL,'','',true), + ('Penticton (British Columbia CAN)','Penticton',-119.593890,49.500830,'CAN','British Columbia',' CA-BC ',' Madeline Lake ',3.9,NULL,NULL,'','',true), + ('Pitt Meadows (British Columbia CAN)','Pitt Meadows',-122.690280,49.220560,'CAN','British Columbia',' CA-BC ',' Alouette River ',5.1,NULL,NULL,'','',true), + ('Port Alberni (British Columbia CAN)','Port Alberni',-124.805830,49.234440,'CAN','British Columbia',' CA-BC ',' Somass River ',1.7,NULL,NULL,'','',true), + ('Port Alice (British Columbia CAN)','Port Alice',-127.488060,50.426670,'CAN','British Columbia',' CA-BC ',' Alice Lake ',6.7,NULL,NULL,'','',true), + ('Port Clements (British Columbia CAN)','Port Clements',-132.183610,53.685560,'CAN','British Columbia',' CA-BC ',' Yakoun River ',3.5,NULL,NULL,'','',true), + ('Port Coquitlam (British Columbia CAN)','Port Coquitlam',-122.780280,49.261940,'CAN','British Columbia',' CA-BC ',' Lafarge Lake ',2.8,NULL,NULL,'','',true), + ('Port Edward (British Columbia CAN)','Port Edward',-130.289440,54.220560,'CAN','British Columbia',' CA-BC ',' Alwyn Lake ',3.6,NULL,NULL,'','',true), + ('Port Hardy (British Columbia CAN)','Port Hardy',-127.498060,50.724440,'CAN','British Columbia',' CA-BC ',' Tsulquate River ',0.8,NULL,NULL,'','',true), + ('Port McNeill (British Columbia CAN)','Port McNeill',-127.083610,50.589440,'CAN','British Columbia',' CA-BC ',' Cluxewe River ',7.1,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Port Moody (British Columbia CAN)','Port Moody',-122.829440,49.282220,'CAN','British Columbia',' CA-BC ',' Munday Lake ',2.7,NULL,NULL,'','',true), + ('Pouce Coupe (British Columbia CAN)','Pouce Coupe',-120.133610,55.714720,'CAN','British Columbia',' CA-BC ',' McWaters Lake ',11.3,NULL,NULL,'','',true), + ('Powell River (British Columbia CAN)','Powell River',-124.524440,49.835560,'CAN','British Columbia',' CA-BC ',' Cranberry Lake ',3.6,NULL,NULL,'','',true), + ('Prince George (British Columbia CAN)','Prince George',-122.745280,53.913060,'CAN','British Columbia',' CA-BC ',' Nechako River ',2.1,NULL,NULL,'','',true), + ('Prince Rupert (British Columbia CAN)','Prince Rupert',-130.325280,54.312780,'CAN','British Columbia',' CA-BC ',' Salt Lake ',3.6,NULL,NULL,'','',true), + ('Princeton (British Columbia CAN)','Princeton',-120.507780,49.460280,'CAN','British Columbia',' CA-BC ',' Tulameen River ',0.4,NULL,NULL,'','',true), + ('Qualicum Beach (British Columbia CAN)','Qualicum Beach',-124.443890,49.348060,'CAN','British Columbia',' CA-BC ',' Little Qualicum River ',4.1,NULL,NULL,'','',true), + ('Queen Charlotte Village of (British Columbia CAN)','Queen Charlotte Village of',-132.102500,53.254720,'CAN','British Columbia',' CA-BC ',' Honna River ',2.0,NULL,NULL,'','',true), + ('Quesnel (British Columbia CAN)','Quesnel',-122.493610,52.979720,'CAN','British Columbia',' CA-BC ',' Quesnel River ',1.1,NULL,NULL,'','',true), + ('Radium Hot Springs (British Columbia CAN)','Radium Hot Springs',-116.076110,50.620000,'CAN','British Columbia',' CA-BC ',' Northcote Lake ',6.3,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Revelstoke (British Columbia CAN)','Revelstoke',-118.195830,50.998890,'CAN','British Columbia',' CA-BC ',' Illecillewaet River ',2.0,NULL,NULL,'','',true), + ('Richmond (British Columbia CAN)','Richmond',-123.163330,49.163330,'CAN','British Columbia',' CA-BC ',' Fraser River ',5.4,NULL,NULL,'','',true), + ('Rossland (British Columbia CAN)','Rossland',-117.802220,49.076940,'CAN','British Columbia',' CA-BC ',' Violin Lake ',7.9,NULL,NULL,'','',true), + ('Saanich (British Columbia CAN)','Saanich',-123.373330,48.456670,'CAN','British Columbia',' CA-BC ',' Swan Lake ',0.7,NULL,NULL,'','',true), + ('Salmo (British Columbia CAN)','Salmo',-117.278610,49.193330,'CAN','British Columbia',' CA-BC ',' Erie Lake ',4.8,NULL,NULL,'','',true), + ('Salmon Arm (British Columbia CAN)','Salmon Arm',-119.278060,50.701390,'CAN','British Columbia',' CA-BC ',' Salmon River ',2.2,NULL,NULL,'','',true), + ('Sayward (British Columbia CAN)','Sayward',-125.959440,50.378890,'CAN','British Columbia',' CA-BC ',' Salmon River ',2.2,NULL,NULL,'','',true), + ('Sechelt (British Columbia CAN)','Sechelt',-123.763330,49.471670,'CAN','British Columbia',' CA-BC ',' Crowston Lake ',6.9,NULL,NULL,'','',true), + ('Sicamous (British Columbia CAN)','Sicamous',-118.980000,50.836110,'CAN','British Columbia',' CA-BC ',' Shuswap River ',1.0,NULL,NULL,'','',true), + ('Sidney (British Columbia CAN)','Sidney',-123.398330,48.650560,'CAN','British Columbia',' CA-BC ',' Quarry Lake ',10.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Silverton (British Columbia CAN)','Silverton',-117.357220,49.952780,'CAN','British Columbia',' CA-BC ',' Slocan Lake ',8.7,NULL,NULL,'','',true), + ('Slocan (British Columbia CAN)','Slocan',-117.466110,49.767780,'CAN','British Columbia',' CA-BC ',' Cahill Lake ',12.0,NULL,NULL,'','',true), + ('Smithers (British Columbia CAN)','Smithers',-127.176110,54.779170,'CAN','British Columbia',' CA-BC ',' Bigelow Lake ',2.7,NULL,NULL,'','',true), + ('Sooke (British Columbia CAN)','Sooke',-123.731940,48.382780,'CAN','British Columbia',' CA-BC ',' Sooke River ',2.4,NULL,NULL,'','',true), + ('Spallumcheen (British Columbia CAN)','Spallumcheen',-119.217500,50.402500,'CAN','British Columbia',' CA-BC ',' Otter Lake ',2.6,NULL,NULL,'','',true), + ('Sparwood (British Columbia CAN)','Sparwood',-114.885830,49.733330,'CAN','British Columbia',' CA-BC ',' Grave Lake ',15.1,NULL,NULL,'','',true), + ('Squamish (British Columbia CAN)','Squamish',-123.155830,49.698060,'CAN','British Columbia',' CA-BC ',' Stawamus River ',1.1,NULL,NULL,'','',true), + ('Stewart (British Columbia CAN)','Stewart',-129.991110,55.938330,'CAN','British Columbia',' CA-BC ',' Bear River ',2.3,NULL,NULL,'','',true), + ('Summerland (British Columbia CAN)','Summerland',-119.681940,49.602220,'CAN','British Columbia',' CA-BC ',' Madeline Lake ',10.5,NULL,NULL,'','',true), + ('Surrey (British Columbia CAN)','Surrey',-122.827500,49.111670,'CAN','British Columbia',' CA-BC ',' Serpentine River ',3.6,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Tahsis (British Columbia CAN)','Tahsis',-126.664440,49.916390,'CAN','British Columbia',' CA-BC ',' Tahsis River ',0.9,NULL,NULL,'','',true), + ('Taylor (British Columbia CAN)','Taylor',-120.686670,56.159170,'CAN','British Columbia',' CA-BC ',' Pine River ',2.4,NULL,NULL,'','',true), + ('Telkwa (British Columbia CAN)','Telkwa',-127.050830,54.696670,'CAN','British Columbia',' CA-BC ',' Telkwa River ',0.2,NULL,NULL,'','',true), + ('Terrace (British Columbia CAN)','Terrace',-128.599720,54.516390,'CAN','British Columbia',' CA-BC ',' Kitsumkalum River ',4.0,NULL,NULL,'','',true), + ('Tofino (British Columbia CAN)','Tofino',-125.904440,49.153060,'CAN','British Columbia',' CA-BC ',' Mallard Lake ',7.8,NULL,NULL,'','',true), + ('Trail (British Columbia CAN)','Trail',-117.709170,49.094440,'CAN','British Columbia',' CA-BC ',' Violin Lake ',6.5,NULL,NULL,'','',true), + ('Tumbler Ridge (British Columbia CAN)','Tumbler Ridge',-120.998060,55.126110,'CAN','British Columbia',' CA-BC ',' Wolverine River ',2.8,NULL,NULL,'','',true), + ('Ucluelet (British Columbia CAN)','Ucluelet',-125.546110,48.942780,'CAN','British Columbia',' CA-BC ',' Itatsoo Lake ',1.6,NULL,NULL,'','',true), + ('Valemount (British Columbia CAN)','Valemount',-119.280000,52.829440,'CAN','British Columbia',' CA-BC ',' Cranberry Lake ',2.7,NULL,NULL,'','',true), + ('Vancouver (British Columbia CAN)','Vancouver',-123.113890,49.261110,'CAN','British Columbia',' CA-BC ',' Trout Lake ',3.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Vanderhoof (British Columbia CAN)','Vanderhoof',-124.007500,54.017500,'CAN','British Columbia',' CA-BC ',' Janze Lake ',10.0,NULL,NULL,'','',true), + ('Vernon (British Columbia CAN)','Vernon',-119.271670,50.265830,'CAN','British Columbia',' CA-BC ',' Swan Lake ',6.1,NULL,NULL,'','',true), + ('Victoria (British Columbia CAN)','Victoria',-123.364720,48.428330,'CAN','British Columbia',' CA-BC ',' Goodacre Lake ',1.5,NULL,NULL,'','',true), + ('View Royal (British Columbia CAN)','View Royal',-123.434170,48.451940,'CAN','British Columbia',' CA-BC ',' Colquitz River ',1.9,NULL,NULL,'','',true), + ('Warfield (British Columbia CAN)','Warfield',-117.749170,49.094170,'CAN','British Columbia',' CA-BC ',' Violin Lake ',7.0,NULL,NULL,'','',true), + ('West Kelowna City of (British Columbia CAN)','West Kelowna City of',-119.628610,49.830000,'CAN','British Columbia',' CA-BC ',' Shannon Lake ',3.2,NULL,NULL,'','',true), + ('West Vancouver (British Columbia CAN)','West Vancouver',-123.159720,49.331110,'CAN','British Columbia',' CA-BC ',' Capilano River ',1.8,NULL,NULL,'','',true), + ('White Rock (British Columbia CAN)','White Rock',-122.798330,49.023610,'CAN','British Columbia',' CA-BC ',' Campbell River ',1.9,NULL,NULL,'','',true), + ('Williams Lake (British Columbia CAN)','Williams Lake',-122.140000,52.129170,'CAN','British Columbia',' CA-BC ',' Bond Lake ',4.6,NULL,NULL,'','',true), + ('Zeballos (British Columbia CAN)','Zeballos',-126.846110,49.982500,'CAN','British Columbia',' CA-BC ',' Zeballos River ',0.5,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Ashern (Manitoba CAN)','Ashern',-98.360260,51.220630,'CAN','Manitoba',' CA-MB ',' Lake Manitoba ',35.3,NULL,NULL,'','',true), + ('Beausejour (Manitoba CAN)','Beausejour',-96.534880,50.074950,'CAN','Manitoba',' CA-MB ',' Pelican Lake ',48.4,NULL,NULL,'','',true), + ('Berens River (Manitoba CAN)','Berens River',-96.961490,52.396630,'CAN','Manitoba',' CA-MB ',' Lake Winnipeg ',40.6,NULL,NULL,'','',true), + ('Bloodvein (Manitoba CAN)','Bloodvein',-96.644110,51.809030,'CAN','Manitoba',' CA-MB ',' Family Lake ',81.9,NULL,NULL,'','',true), + ('Brandon (Manitoba CAN)','Brandon',-99.929520,49.848940,'CAN','Manitoba',' CA-MB ',' Vermilion River ',45.7,NULL,NULL,'','',true), + ('Brochet (Manitoba CAN)','Brochet',-101.677960,57.930590,'CAN','Manitoba',' CA-MB ',' Cochrane River ',52.0,NULL,NULL,'','',true), + ('Churchill (Manitoba CAN)','Churchill',-94.092750,58.728410,'CAN','Manitoba',' CA-MB ',' North Knife River ',96.2,NULL,NULL,'','',true), + ('Cranberry Portage (Manitoba CAN)','Cranberry Portage',-101.330560,54.601610,'CAN','Manitoba',' CA-MB ',' Simonhouse Lake ',12.2,NULL,NULL,'','',true), + ('Cross Lake (Manitoba CAN)','Cross Lake',-97.711410,54.625160,'CAN','Manitoba',' CA-MB ',' Nelson River ',5.6,NULL,NULL,'','',true), + ('Dauphin (Manitoba CAN)','Dauphin',-100.055960,51.142770,'CAN','Manitoba',' CA-MB ',' Lake Manitoba ',83.3,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Emerson (Manitoba CAN)','Emerson',-97.224620,49.040460,'CAN','Manitoba',' CA-MB ',' Roseau River ',47.4,NULL,NULL,'','',true), + ('Flin Flon (Manitoba CAN)','Flin Flon',-101.871700,54.772070,'CAN','Manitoba',' CA-MB ',' Athapapuskow Lake ',24.9,NULL,NULL,'','',true), + ('Fort Alexander (Manitoba CAN)','Fort Alexander',-96.338440,50.608870,'CAN','Manitoba',' CA-MB ',' Lac du Bonnet ',41.9,NULL,NULL,'','',true), + ('Garden Hill (Manitoba CAN)','Garden Hill',-94.618330,53.904310,'CAN','Manitoba',' CA-MB ',' Island Lake ',8.2,NULL,NULL,'','',true), + ('Gillam (Manitoba CAN)','Gillam',-94.618020,56.348590,'CAN','Manitoba',' CA-MB ',' Limestone River ',42.3,NULL,NULL,'','',true), + ('Gimli (Manitoba CAN)','Gimli',-97.023400,50.606200,'CAN','Manitoba',' CA-MB ',' Lac du Bonnet ',84.4,NULL,NULL,'','',true), + ('Gods Lake Narrows (Manitoba CAN)','Gods Lake Narrows',-94.415330,54.538670,'CAN','Manitoba',' CA-MB ',' Gods Lake ',16.3,NULL,NULL,'','',true), + ('Grand Rapids (Manitoba CAN)','Grand Rapids',-99.306670,53.204460,'CAN','Manitoba',' CA-MB ',' Katimik Lake ',36.4,NULL,NULL,'','',true), + ('Killarney (Manitoba CAN)','Killarney',-99.647500,49.186990,'CAN','Manitoba',' CA-MB ',' Plum Creek ',84.1,NULL,NULL,'','',true), + ('Lac Brochet (Manitoba CAN)','Lac Brochet',-101.503170,58.702960,'CAN','Manitoba',' CA-MB ',' Maria Lake ',49.6,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Leaf Rapids (Manitoba CAN)','Leaf Rapids',-100.015500,56.442720,'CAN','Manitoba',' CA-MB ',' Eden Lake ',26.2,NULL,NULL,'','',true), + ('Little Grand Rapids (Manitoba CAN)','Little Grand Rapids',-95.455540,52.094620,'CAN','Manitoba',' CA-MB ',' Fishing Lake ',9.1,NULL,NULL,'','',true), + ('Lynn Lake (Manitoba CAN)','Lynn Lake',-101.076310,56.915070,'CAN','Manitoba',' CA-MB ',' Goldsand Lake ',15.0,NULL,NULL,'','',true), + ('Melita (Manitoba CAN)','Melita',-101.022830,49.271070,'CAN','Manitoba',' CA-MB ',' Plum Lakes ',49.1,NULL,NULL,'','',true), + ('Minnedosa (Manitoba CAN)','Minnedosa',-99.880120,50.261840,'CAN','Manitoba',' CA-MB ',' Assiniboine ',12.2,NULL,NULL,'','',true), + ('Morden (Manitoba CAN)','Morden',-98.175510,49.219320,'CAN','Manitoba',' CA-MB ',' Wolf River ',95.3,NULL,NULL,'','',true), + ('Neepawa (Manitoba CAN)','Neepawa',-99.473170,50.239860,'CAN','Manitoba',' CA-MB ',' Vermilion River ',30.5,NULL,NULL,'','',true), + ('Nelson House (Manitoba CAN)','Nelson House',-98.863680,55.788580,'CAN','Manitoba',' CA-MB ',' Threepoint Lake ',11.7,NULL,NULL,'','',true), + ('Norway House (Manitoba CAN)','Norway House',-97.820180,53.965820,'CAN','Manitoba',' CA-MB ',' Gunisao River ',51.3,NULL,NULL,'','',true), + ('Oxford House (Manitoba CAN)','Oxford House',-95.213820,54.940000,'CAN','Manitoba',' CA-MB ',' Knee Lake ',32.6,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Poplar River (Manitoba CAN)','Poplar River',-97.314170,53.048390,'CAN','Manitoba',' CA-MB ',' Weaver Lake ',53.4,NULL,NULL,'','',true), + ('Portage la Prairie (Manitoba CAN)','Portage la Prairie',-98.256790,49.984290,'CAN','Manitoba',' CA-MB ',' Vermilion River ',76.5,NULL,NULL,'','',true), + ('Pukatawagan (Manitoba CAN)','Pukatawagan',-101.283220,55.777710,'CAN','Manitoba',' CA-MB ',' Flatrock Lake ',32.2,NULL,NULL,'','',true), + ('Roblin (Manitoba CAN)','Roblin',-101.421950,51.288180,'CAN','Manitoba',' CA-MB ',' Big Sandy Lake ',91.9,NULL,NULL,'','',true), + ('Russell (Manitoba CAN)','Russell',-101.277440,50.775820,'CAN','Manitoba',' CA-MB ',' Pipestone Creek ',96.7,NULL,NULL,'','',true), + ('Selkirk (Manitoba CAN)','Selkirk',-96.892310,50.188580,'CAN','Manitoba',' CA-MB ',' Pelican Lake ',70.8,NULL,NULL,'','',true), + ('Shamattawa (Manitoba CAN)','Shamattawa',-92.126210,55.914350,'CAN','Manitoba',' CA-MB ',' Gods ',71.4,NULL,NULL,'','',true), + ('Snow Lake (Manitoba CAN)','Snow Lake',-100.050790,54.893030,'CAN','Manitoba',' CA-MB ',' Wekusko Lake ',17.5,NULL,NULL,'','',true), + ('Souris (Manitoba CAN)','Souris',-100.338470,49.632610,'CAN','Manitoba',' CA-MB ',' Plum Creek ',15.8,NULL,NULL,'','',true), + ('South Indian Lake (Manitoba CAN)','South Indian Lake',-98.948290,56.764850,'CAN','Manitoba',' CA-MB ',' Southern Indian Lake ',38.7,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Split Lake (Manitoba CAN)','Split Lake',-96.141070,56.286590,'CAN','Manitoba',' CA-MB ',' Split Lake ',12.1,NULL,NULL,'','',true), + ('Steinbach (Manitoba CAN)','Steinbach',-96.681520,49.567570,'CAN','Manitoba',' CA-MB ',' Pelican Lake ',25.6,NULL,NULL,'','',true), + ('Swan River (Manitoba CAN)','Swan River',-101.198700,52.133720,'CAN','Manitoba',' CA-MB ',' Swan Lake ',49.9,NULL,NULL,'','',true), + ('The Pas (Manitoba CAN)','The Pas',-101.247150,53.819200,'CAN','Manitoba',' CA-MB ',' Reader Lake ',18.9,NULL,NULL,'','',true), + ('Thompson (Manitoba CAN)','Thompson',-97.837840,55.733620,'CAN','Manitoba',' CA-MB ',' Paint Lake ',25.2,NULL,NULL,'','',true), + ('Virden (Manitoba CAN)','Virden',-100.928080,49.833870,'CAN','Manitoba',' CA-MB ',' Plum Lakes ',25.0,NULL,NULL,'','',true), + ('Winkler (Manitoba CAN)','Winkler',-97.888180,49.228840,'CAN','Manitoba',' CA-MB ',' Roseau River ',97.3,NULL,NULL,'','',true), + ('Winnipeg (Manitoba CAN)','Winnipeg',-97.175450,49.914130,'CAN','Manitoba',' CA-MB ',' Pelican Lake ',65.7,NULL,NULL,'','',true), + ('Winnipegosis (Manitoba CAN)','Winnipegosis',-99.993400,51.662800,'CAN','Manitoba',' CA-MB ',' Big Sandy Lake ',43.3,NULL,NULL,'','',true), + ('Bathurst (New Brunswick CAN)','Bathurst',-65.686100,47.613130,'CAN','New Brunswick',' CA-NB ',' Nepisiguit River ',45.1,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Campbellton (New Brunswick CAN)','Campbellton',-66.632610,47.944930,'CAN','New Brunswick',' CA-NB ',' Rivire Matapdia ',55.1,NULL,NULL,'','',true), + ('Caraquet (New Brunswick CAN)','Caraquet',-64.915460,47.760550,'CAN','New Brunswick',' CA-NB ',' Rivire Bonaventure ',89.0,NULL,NULL,'','',true), + ('Dalhousie (New Brunswick CAN)','Dalhousie',-66.402210,48.011850,'CAN','New Brunswick',' CA-NB ',' Rivire Cascapdia ',65.8,NULL,NULL,'','',true), + ('Edmundston (New Brunswick CAN)','Edmundston',-68.307710,47.394730,'CAN','New Brunswick',' CA-NB ',' Fish River ',29.0,NULL,NULL,'','',true), + ('Fredericton (New Brunswick CAN)','Fredericton',-66.685630,45.922940,'CAN','New Brunswick',' CA-NB ',' Chiputneticook Lakes ',80.6,NULL,NULL,'','',true), + ('Grand Falls Grand Sault (New Brunswick CAN)','Grand Falls Grand Sault',-67.691450,47.032050,'CAN','New Brunswick',' CA-NB ',' Tobique River ',33.0,NULL,NULL,'','',true), + ('Miramichi (New Brunswick CAN)','Miramichi',-65.481960,47.075490,'CAN','New Brunswick',' CA-NB ',' Nepisiguit River ',66.4,NULL,NULL,'','',true), + ('Moncton (New Brunswick CAN)','Moncton',-64.871720,46.086750,'CAN','New Brunswick',' CA-NB ',' Petitcodiac River ',17.6,NULL,NULL,'','',true), + ('Saint John (New Brunswick CAN)','Saint John',-66.030040,45.296950,'CAN','New Brunswick',' CA-NB ',' Kennebecasis River ',61.1,NULL,NULL,'','',true), + ('St Stephen (New Brunswick CAN)','St Stephen',-67.254450,45.236380,'CAN','New Brunswick',' CA-NB ',' Saint Croix River ',26.3,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Sussex (New Brunswick CAN)','Sussex',-65.502470,45.708130,'CAN','New Brunswick',' CA-NB ',' Kennebecasis River ',7.6,NULL,NULL,'','',true), + ('Tracadie Sheila (New Brunswick CAN)','Tracadie Sheila',-64.939420,47.535420,'CAN','New Brunswick',' CA-NB ',' Nepisiguit River ',96.3,NULL,NULL,'','',true), + ('Baie Verte (Newfoundland and Labrador CAN)','Baie Verte',-56.211280,49.984710,'CAN','Newfoundland and Labrador',' CA-NL ',' Cat Arm River ',55.9,NULL,NULL,'','',true), + ('Bishops Falls (Newfoundland and Labrador CAN)','Bishops Falls',-55.486090,49.049790,'CAN','Newfoundland and Labrador',' CA-NL ',' Exploits ',41.1,NULL,NULL,'','',true), + ('Bonavista (Newfoundland and Labrador CAN)','Bonavista',-53.094150,48.647110,'CAN','Newfoundland and Labrador',' CA-NL ',' Terra Nova River ',119.0,NULL,NULL,'','',true), + ('Buchans (Newfoundland and Labrador CAN)','Buchans',-56.861050,48.823400,'CAN','Newfoundland and Labrador',' CA-NL ',' Exploits ',15.7,NULL,NULL,'','',true), + ('Burgeo (Newfoundland and Labrador CAN)','Burgeo',-57.631370,47.663160,'CAN','Newfoundland and Labrador',' CA-NL ',' White Bear River ',45.4,NULL,NULL,'','',true), + ('Carbonear (Newfoundland and Labrador CAN)','Carbonear',-53.241370,47.764350,'CAN','Newfoundland and Labrador',' CA-NL ',' Long Harbour River ',127.6,NULL,NULL,'','',true), + ('Cartwright (Newfoundland and Labrador CAN)','Cartwright',-56.895220,53.694730,'CAN','Newfoundland and Labrador',' CA-NL ',' Sand Hill River ',33.6,NULL,NULL,'','',true), + ('Channel Port aux Basques (Newfoundland and Labrador CAN)','Channel Port aux Basques',-59.165350,47.597850,'CAN','Newfoundland and Labrador',' CA-NL ',' King George IV Lake ',116.7,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Churchill Falls (Newfoundland and Labrador CAN)','Churchill Falls',-64.061020,53.549630,'CAN','Newfoundland and Labrador',' CA-NL ',' Ossokmanuan Lake ',52.1,NULL,NULL,'','',true), + ('Clarenville (Newfoundland and Labrador CAN)','Clarenville',-54.020210,48.137970,'CAN','Newfoundland and Labrador',' CA-NL ',' Terra Nova River ',59.8,NULL,NULL,'','',true), + ('Corner Brook (Newfoundland and Labrador CAN)','Corner Brook',-57.926410,48.929430,'CAN','Newfoundland and Labrador',' CA-NL ',' Humber River ',21.7,NULL,NULL,'','',true), + ('Deer Lake (Newfoundland and Labrador CAN)','Deer Lake',-57.373330,49.193100,'CAN','Newfoundland and Labrador',' CA-NL ',' Humber River ',28.1,NULL,NULL,'','',true), + ('Gander (Newfoundland and Labrador CAN)','Gander',-54.611520,48.960630,'CAN','Newfoundland and Labrador',' CA-NL ',' Gander Lake ',12.5,NULL,NULL,'','',true), + ('Grand Bank (Newfoundland and Labrador CAN)','Grand Bank',-55.727420,47.066000,'CAN','Newfoundland and Labrador',' CA-NL ',' Bay du Nord River ',99.4,NULL,NULL,'','',true), + ('Grand Falls Windsor (Newfoundland and Labrador CAN)','Grand Falls Windsor',-55.689310,48.973410,'CAN','Newfoundland and Labrador',' CA-NL ',' Exploits ',24.2,NULL,NULL,'','',true), + ('Happy Valley Goose Bay (Newfoundland and Labrador CAN)','Happy Valley Goose Bay',-60.278580,53.317060,'CAN','Newfoundland and Labrador',' CA-NL ',' Kenamu River ',44.7,NULL,NULL,'','',true), + ('Harbour Breton (Newfoundland and Labrador CAN)','Harbour Breton',-55.812710,47.508610,'CAN','Newfoundland and Labrador',' CA-NL ',' Bay du Nord River ',57.0,NULL,NULL,'','',true), + ('Hopedale (Newfoundland and Labrador CAN)','Hopedale',-60.222820,55.444620,'CAN','Newfoundland and Labrador',' CA-NL ',' Kaipokok River ',92.6,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Labrador City (Newfoundland and Labrador CAN)','Labrador City',-67.012280,52.992850,'CAN','Newfoundland and Labrador',' CA-NL ',' Shabogamo Lake ',31.8,NULL,NULL,'','',true), + ('Lewisporte (Newfoundland and Labrador CAN)','Lewisporte',-55.033360,49.262680,'CAN','Newfoundland and Labrador',' CA-NL ',' Gander River ',30.7,NULL,NULL,'','',true), + ('Makkovik (Newfoundland and Labrador CAN)','Makkovik',-59.110180,55.099480,'CAN','Newfoundland and Labrador',' CA-NL ',' Little Michinappi Lake ',67.6,NULL,NULL,'','',true), + ('Marystown (Newfoundland and Labrador CAN)','Marystown',-55.153020,47.171470,'CAN','Newfoundland and Labrador',' CA-NL ',' Bay du Nord River ',85.7,NULL,NULL,'','',true), + ('Nain (Newfoundland and Labrador CAN)','Nain',-61.729510,56.551050,'CAN','Newfoundland and Labrador',' CA-NL ',' Kogaluk River ',79.0,NULL,NULL,'','',true), + ('Natuashish (Newfoundland and Labrador CAN)','Natuashish',-61.123490,55.923800,'CAN','Newfoundland and Labrador',' CA-NL ',' Notakwanon River ',97.3,NULL,NULL,'','',true), + ('Placentia (Newfoundland and Labrador CAN)','Placentia',-53.946540,47.275830,'CAN','Newfoundland and Labrador',' CA-NL ',' Long Harbour River ',108.0,NULL,NULL,'','',true), + ('Port Hope Simpson (Newfoundland and Labrador CAN)','Port Hope Simpson',-56.210190,52.522510,'CAN','Newfoundland and Labrador',' CA-NL ',' St Lewis River ',37.8,NULL,NULL,'','',true), + ('Rigolet (Newfoundland and Labrador CAN)','Rigolet',-58.467770,54.187160,'CAN','Newfoundland and Labrador',' CA-NL ',' Little Michinappi Lake ',80.0,NULL,NULL,'','',true), + ('Rocky Harbour (Newfoundland and Labrador CAN)','Rocky Harbour',-57.879540,49.626270,'CAN','Newfoundland and Labrador',' CA-NL ',' Upper Humber River ',41.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Roddickton (Newfoundland and Labrador CAN)','Roddickton',-56.063930,50.876350,'CAN','Newfoundland and Labrador',' CA-NL ',' Cat Arm River ',101.8,NULL,NULL,'','',true), + ('Springdale (Newfoundland and Labrador CAN)','Springdale',-56.080460,49.530970,'CAN','Newfoundland and Labrador',' CA-NL ',' Exploits ',69.8,NULL,NULL,'','',true), + ('St Anthony (Newfoundland and Labrador CAN)','St Anthony',-55.544530,51.376910,'CAN','Newfoundland and Labrador',' CA-NL ',' Pinware River ',99.9,NULL,NULL,'','',true), + ('St Georges (Newfoundland and Labrador CAN)','St Georges',-58.476200,48.377300,'CAN','Newfoundland and Labrador',' CA-NL ',' King George IV Lake ',46.8,NULL,NULL,'','',true), + ('St Johns (Newfoundland and Labrador CAN)','St Johns',-52.742160,47.546050,'CAN','Newfoundland and Labrador',' CA-NL ',' Long Harbour River ',170.1,NULL,NULL,'','',true), + ('Stephenville (Newfoundland and Labrador CAN)','Stephenville',-58.487290,48.540510,'CAN','Newfoundland and Labrador',' CA-NL ',' King George IV Lake ',57.0,NULL,NULL,'','',true), + ('Trepassey (Newfoundland and Labrador CAN)','Trepassey',-53.346970,46.763490,'CAN','Newfoundland and Labrador',' CA-NL ',' Long Harbour River ',180.8,NULL,NULL,'','',true), + ('Twillingate (Newfoundland and Labrador CAN)','Twillingate',-54.648410,49.610710,'CAN','Newfoundland and Labrador',' CA-NL ',' Gander River ',63.5,NULL,NULL,'','',true), + ('Wabush (Newfoundland and Labrador CAN)','Wabush',-66.940560,52.913540,'CAN','Newfoundland and Labrador',' CA-NL ',' Lac Mnistouc ',32.0,NULL,NULL,'','',true), + ('Aklavik (Northwest Territories CAN)','Aklavik',-134.991560,68.247450,'CAN','Northwest Territories',' CA-NT ',' Mackenzie River ',15.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Colville Lake (Northwest Territories CAN)','Colville Lake',-126.150920,67.025350,'CAN','Northwest Territories',' CA-NT ',' Colville Lake ',17.1,NULL,NULL,'','',true), + ('Deline (Northwest Territories CAN)','Deline',-123.388570,65.213370,'CAN','Northwest Territories',' CA-NT ',' Brackett Lake ',91.5,NULL,NULL,'','',true), + ('Fort Good Hope (Northwest Territories CAN)','Fort Good Hope',-128.664000,66.275200,'CAN','Northwest Territories',' CA-NT ',' Lac a Jacques ',58.2,NULL,NULL,'','',true), + ('Fort Liard (Northwest Territories CAN)','Fort Liard',-123.371610,60.227410,'CAN','Northwest Territories',' CA-NT ',' Petitot River ',33.2,NULL,NULL,'','',true), + ('Fort McPherson (Northwest Territories CAN)','Fort McPherson',-134.743040,67.435830,'CAN','Northwest Territories',' CA-NT ',' Bell River ',99.9,NULL,NULL,'','',true), + ('Fort Providence (Northwest Territories CAN)','Fort Providence',-117.627480,61.389810,'CAN','Northwest Territories',' CA-NT ',' Laferte River ',63.9,NULL,NULL,'','',true), + ('Fort Resolution (Northwest Territories CAN)','Fort Resolution',-113.609040,61.182990,'CAN','Northwest Territories',' CA-NT ',' Thubun River ',70.9,NULL,NULL,'','',true), + ('Fort Simpson (Northwest Territories CAN)','Fort Simpson',-121.417000,61.839720,'CAN','Northwest Territories',' CA-NT ',' Martin River ',11.8,NULL,NULL,'','',true), + ('Fort Smith (Northwest Territories CAN)','Fort Smith',-112.089180,60.032490,'CAN','Northwest Territories',' CA-NT ',' Gordon Lake ',9.8,NULL,NULL,'','',true), + ('Hay River (Northwest Territories CAN)','Hay River',-115.907950,60.824480,'CAN','Northwest Territories',' CA-NT ',' Falaise Lake ',74.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Holman (Northwest Territories CAN)','Holman',-117.853780,70.766050,'CAN','Northwest Territories',' CA-NT ',' Kuujjua River ',183.1,NULL,NULL,'','',true), + ('Inuvik (Northwest Territories CAN)','Inuvik',-133.690740,68.367930,'CAN','Northwest Territories',' CA-NT ',' Sitidgi Lake ',44.7,NULL,NULL,'','',true), + ('Lutselke (Northwest Territories CAN)','Lutselke',-110.702570,62.370610,'CAN','Northwest Territories',' CA-NT ',' Gagnon Lake ',49.5,NULL,NULL,'','',true), + ('Norman Wells (Northwest Territories CAN)','Norman Wells',-126.930240,65.309690,'CAN','Northwest Territories',' CA-NT ',' Mackenzie ',39.3,NULL,NULL,'','',true), + ('Paulatuk (Northwest Territories CAN)','Paulatuk',-124.031700,69.356390,'CAN','Northwest Territories',' CA-NT ',' Fallaize Lake ',50.7,NULL,NULL,'','',true), + ('Rae Edzo (Northwest Territories CAN)','Rae Edzo',-115.947470,62.838510,'CAN','Northwest Territories',' CA-NT ',' Whitefish River ',59.1,NULL,NULL,'','',true), + ('Rae Lakes (Northwest Territories CAN)','Rae Lakes',-117.206080,64.063530,'CAN','Northwest Territories',' CA-NT ',' Lac Ste Croix ',32.1,NULL,NULL,'','',true), + ('Sachs Harbour (Northwest Territories CAN)','Sachs Harbour',-125.453790,71.994330,'CAN','Northwest Territories',' CA-NT ',' Storkerson River ',119.1,NULL,NULL,'','',true), + ('Tsiigehtchic (Northwest Territories CAN)','Tsiigehtchic',-133.642880,67.434800,'CAN','Northwest Territories',' CA-NT ',' Travaillant River ',83.5,NULL,NULL,'','',true), + ('Tuktoyaktuk (Northwest Territories CAN)','Tuktoyaktuk',-133.201490,69.404930,'CAN','Northwest Territories',' CA-NT ',' Parsons Lake ',52.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Tulita (Northwest Territories CAN)','Tulita',-125.519860,64.907230,'CAN','Northwest Territories',' CA-NT ',' Brackett Lake ',36.0,NULL,NULL,'','',true), + ('Wekweti (Northwest Territories CAN)','Wekweti',-114.189940,64.230380,'CAN','Northwest Territories',' CA-NT ',' Wecho Lake ',32.7,NULL,NULL,'','',true), + ('Wha Ti (Northwest Territories CAN)','Wha Ti',-117.190870,63.182590,'CAN','Northwest Territories',' CA-NT ',' Lac la Martre ',40.5,NULL,NULL,'','',true), + ('Wrigley (Northwest Territories CAN)','Wrigley',-123.525450,63.298320,'CAN','Northwest Territories',' CA-NT ',' Fish Lake ',48.7,NULL,NULL,'','',true), + ('Yellowknife (Northwest Territories CAN)','Yellowknife',-114.384280,62.487600,'CAN','Northwest Territories',' CA-NT ',' Margaret Lake ',7.9,NULL,NULL,'','',true), + ('Amherst (Nova Scotia CAN)','Amherst',-64.143670,45.832150,'CAN','Nova Scotia',' CA-NS ',' Petitcodiac River ',73.8,NULL,NULL,'','',true), + ('Antigonish (Nova Scotia CAN)','Antigonish',-61.910200,45.600340,'CAN','Nova Scotia',' CA-NS ',' Saint Marys ',51.9,NULL,NULL,'','',true), + ('Bridgewater (Nova Scotia CAN)','Bridgewater',-64.508650,44.350640,'CAN','Nova Scotia',' CA-NS ',' LaHave River ',35.6,NULL,NULL,'','',true), + ('Canso (Nova Scotia CAN)','Canso',-61.049630,45.322920,'CAN','Nova Scotia',' CA-NS ',' Lake Ainslie ',92.8,NULL,NULL,'','',true), + ('Cape Breton (Nova Scotia CAN)','Cape Breton',-60.118320,46.156790,'CAN','Nova Scotia',' CA-NS ',' Mira River ',16.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Cheticamp (Nova Scotia CAN)','Cheticamp',-60.959510,46.662200,'CAN','Nova Scotia',' CA-NS ',' Northeast Margaree River ',21.3,NULL,NULL,'','',true), + ('Halifax (Nova Scotia CAN)','Halifax',-63.703020,44.639290,'CAN','Nova Scotia',' CA-NS ',' Shubenacadie River ',39.1,NULL,NULL,'','',true), + ('Inverness (Nova Scotia CAN)','Inverness',-61.268660,46.229140,'CAN','Nova Scotia',' CA-NS ',' Lake Ainslie ',10.6,NULL,NULL,'','',true), + ('Kentville (Nova Scotia CAN)','Kentville',-64.487570,45.070970,'CAN','Nova Scotia',' CA-NS ',' Annapolis River ',42.5,NULL,NULL,'','',true), + ('Middleton (Nova Scotia CAN)','Middleton',-65.055680,44.900760,'CAN','Nova Scotia',' CA-NS ',' Annapolis River ',6.6,NULL,NULL,'','',true), + ('New Glasgow (Nova Scotia CAN)','New Glasgow',-62.634270,45.573380,'CAN','Nova Scotia',' CA-NS ',' Saint Marys ',42.5,NULL,NULL,'','',true), + ('Port Hawkesbury (Nova Scotia CAN)','Port Hawkesbury',-61.318710,45.651950,'CAN','Nova Scotia',' CA-NS ',' Lake Ainslie ',56.5,NULL,NULL,'','',true), + ('Shelburne (Nova Scotia CAN)','Shelburne',-65.315170,43.771460,'CAN','Nova Scotia',' CA-NS ',' Lake Rossignol ',52.4,NULL,NULL,'','',true), + ('Truro (Nova Scotia CAN)','Truro',-63.243090,45.375780,'CAN','Nova Scotia',' CA-NS ',' Shubenacadie River ',50.5,NULL,NULL,'','',true), + ('Yarmouth (Nova Scotia CAN)','Yarmouth',-66.118470,43.850250,'CAN','Nova Scotia',' CA-NS ',' Lake Rossignol ',91.3,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Arctic Bay (Nunavut CAN)','Arctic Bay',-85.280760,73.033340,'CAN','Nunavut',' CA-NU ',' Robertson River ',167.8,NULL,NULL,'','',true), + ('Arviat (Nunavut CAN)','Arviat',-94.122160,61.126860,'CAN','Nunavut',' CA-NU ',' Hyde Lake ',84.4,NULL,NULL,'','',true), + ('Baker Lake (Nunavut CAN)','Baker Lake',-95.986270,64.317670,'CAN','Nunavut',' CA-NU ',' Baker Lake ',42.1,NULL,NULL,'','',true), + ('Bathurst Inlet (Nunavut CAN)','Bathurst Inlet',-108.067410,66.812650,'CAN','Nunavut',' CA-NU ',' Hiukitak River ',70.2,NULL,NULL,'','',true), + ('Cambridge Bay (Nunavut CAN)','Cambridge Bay',-104.980480,69.120110,'CAN','Nunavut',' CA-NU ',' Ekalluk River ',49.3,NULL,NULL,'','',true), + ('Cape Dorset (Nunavut CAN)','Cape Dorset',-76.502650,64.199810,'CAN','Nunavut',' CA-NU ',' Aukpar River ',179.3,NULL,NULL,'','',true), + ('Chesterfield Inlet (Nunavut CAN)','Chesterfield Inlet',-90.802340,63.338550,'CAN','Nunavut',' CA-NU ',' Hanway Lake ',71.9,NULL,NULL,'','',true), + ('Clyde River (Nunavut CAN)','Clyde River',-68.501120,70.461000,'CAN','Nunavut',' CA-NU ',' Kogalu River ',33.3,NULL,NULL,'','',true), + ('Coral Harbour (Nunavut CAN)','Coral Harbour',-83.362760,64.163390,'CAN','Nunavut',' CA-NU ',' Kirchoffer River ',50.4,NULL,NULL,'','',true), + ('Gjoa Haven (Nunavut CAN)','Gjoa Haven',-95.873090,68.651270,'CAN','Nunavut',' CA-NU ',' Murchison River ',128.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Hall Beach (Nunavut CAN)','Hall Beach',-81.275390,68.758140,'CAN','Nunavut',' CA-NU ',' Hall Lake ',41.9,NULL,NULL,'','',true), + ('Igloolik (Nunavut CAN)','Igloolik',-81.802440,69.385630,'CAN','Nunavut',' CA-NU ',' Hall Lake ',77.6,NULL,NULL,'','',true), + ('Iqaluit (Nunavut CAN)','Iqaluit',-68.470130,63.762800,'CAN','Nunavut',' CA-NU ',' Sylvia Grinnell River ',28.6,NULL,NULL,'','',true), + ('Kimmirut (Nunavut CAN)','Kimmirut',-69.849220,62.809190,'CAN','Nunavut',' CA-NU ',' Soper River ',45.9,NULL,NULL,'','',true), + ('Kugaaruk (Nunavut CAN)','Kugaaruk',-89.772800,68.512210,'CAN','Nunavut',' CA-NU ',' Barrow Lake ',14.0,NULL,NULL,'','',true), + ('Kugluktuk (Nunavut CAN)','Kugluktuk',-115.236210,67.796250,'CAN','Nunavut',' CA-NU ',' Asiak River ',63.6,NULL,NULL,'','',true), + ('Nanisivik (Nunavut CAN)','Nanisivik',-84.798830,73.051730,'CAN','Nunavut',' CA-NU ',' Robertson River ',156.6,NULL,NULL,'','',true), + ('Pangnirtung (Nunavut CAN)','Pangnirtung',-65.642210,66.114830,'CAN','Nunavut',' CA-NU ',' Padle River ',90.3,NULL,NULL,'','',true), + ('Pond Inlet (Nunavut CAN)','Pond Inlet',-77.868880,72.666850,'CAN','Nunavut',' CA-NU ',' Robertson River ',129.1,NULL,NULL,'','',true), + ('Qikiqtarjuaq (Nunavut CAN)','Qikiqtarjuaq',-63.954600,67.539210,'CAN','Nunavut',' CA-NU ',' Padle River ',95.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Rankin Inlet (Nunavut CAN)','Rankin Inlet',-92.109620,62.818810,'CAN','Nunavut',' CA-NU ',' Machum Lake ',58.0,NULL,NULL,'','',true), + ('Repulse Bay (Nunavut CAN)','Repulse Bay',-86.213210,66.527960,'CAN','Nunavut',' CA-NU ',' Hansine Lake ',105.3,NULL,NULL,'','',true), + ('Sanikiluaq (Nunavut CAN)','Sanikiluaq',-79.209440,56.506040,'CAN','Nunavut',' CA-NU ',' Lac Lomier ',191.3,NULL,NULL,'','',true), + ('Taloyoak (Nunavut CAN)','Taloyoak',-93.435020,69.542100,'CAN','Nunavut',' CA-NU ',' Middle Lake ',11.2,NULL,NULL,'','',true), + ('Whale Cove (Nunavut CAN)','Whale Cove',-92.604390,62.182990,'CAN','Nunavut',' CA-NU ',' Wilson River ',56.9,NULL,NULL,'','',true), + ('Armstrong (Ontario CAN)','Armstrong',-89.026720,50.295010,'CAN','Ontario',' CA-ON ',' Caribou Lake ',20.3,NULL,NULL,'','',true), + ('Atikokan (Ontario CAN)','Atikokan',-91.590270,48.747950,'CAN','Ontario',' CA-ON ',' Marmion Lake ',19.7,NULL,NULL,'','',true), + ('Attawapiskat (Ontario CAN)','Attawapiskat',-82.497110,52.932530,'CAN','Ontario',' CA-ON ',' Lawashi River ',71.0,NULL,NULL,'','',true), + ('Barrie (Ontario CAN)','Barrie',-79.704050,44.375030,'CAN','Ontario',' CA-ON ',' Lake Simcoe ',28.7,NULL,NULL,'','',true), + ('Bearskin Lake (Ontario CAN)','Bearskin Lake',-90.925830,53.952740,'CAN','Ontario',' CA-ON ',' Severn ',27.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Belleville (Ontario CAN)','Belleville',-77.364010,44.181900,'CAN','Ontario',' CA-ON ',' Trent River ',33.6,NULL,NULL,'','',true), + ('Big Trout Lake (Ontario CAN)','Big Trout Lake',-89.880680,53.868740,'CAN','Ontario',' CA-ON ',' Big Trout Lake ',11.0,NULL,NULL,'','',true), + ('Blind River (Ontario CAN)','Blind River',-82.918910,46.257860,'CAN','Ontario',' CA-ON ',' Quirke Lake ',38.0,NULL,NULL,'','',true), + ('Bracebridge (Ontario CAN)','Bracebridge',-79.341070,45.027840,'CAN','Ontario',' CA-ON ',' North Branch Muskoka River ',7.2,NULL,NULL,'','',true), + ('Brockville (Ontario CAN)','Brockville',-75.793980,44.635410,'CAN','Ontario',' CA-ON ',' Rideau River ',31.7,NULL,NULL,'','',true), + ('Chapleau (Ontario CAN)','Chapleau',-83.417810,47.859490,'CAN','Ontario',' CA-ON ',' Wenebegon Lake ',56.5,NULL,NULL,'','',true), + ('Chatham Kent (Ontario CAN)','Chatham Kent',-82.160310,42.372150,'CAN','Ontario',' CA-ON ',' Lake Saint Clair ',48.9,NULL,NULL,'','',true), + ('Cochrane (Ontario CAN)','Cochrane',-81.054820,49.095460,'CAN','Ontario',' CA-ON ',' Frederick House River ',24.9,NULL,NULL,'','',true), + ('Collingwood (Ontario CAN)','Collingwood',-80.087500,44.454090,'CAN','Ontario',' CA-ON ',' Lake Simcoe ',56.2,NULL,NULL,'','',true), + ('Cornwall (Ontario CAN)','Cornwall',-74.906910,45.086020,'CAN','Ontario',' CA-ON ',' Saint Lawrence ',28.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Deer Lake (Ontario CAN)','Deer Lake',-94.081270,52.658460,'CAN','Ontario',' CA-ON ',' McInnes River ',21.3,NULL,NULL,'','',true), + ('Dryden (Ontario CAN)','Dryden',-92.800490,49.803800,'CAN','Ontario',' CA-ON ',' Wabigoon River ',16.5,NULL,NULL,'','',true), + ('Dubreuilville (Ontario CAN)','Dubreuilville',-84.610280,48.334520,'CAN','Ontario',' CA-ON ',' Magpie River ',17.9,NULL,NULL,'','',true), + ('Ear Falls (Ontario CAN)','Ear Falls',-93.239520,50.644880,'CAN','Ontario',' CA-ON ',' Phelps Lake ',14.5,NULL,NULL,'','',true), + ('Elliot Lake (Ontario CAN)','Elliot Lake',-82.462110,46.417570,'CAN','Ontario',' CA-ON ',' Serpent River ',5.6,NULL,NULL,'','',true), + ('Englehart (Ontario CAN)','Englehart',-79.857480,47.840210,'CAN','Ontario',' CA-ON ',' Blanche River ',18.7,NULL,NULL,'','',true), + ('Espanola (Ontario CAN)','Espanola',-81.704450,46.221150,'CAN','Ontario',' CA-ON ',' Lake Panache ',25.6,NULL,NULL,'','',true), + ('Foleyet (Ontario CAN)','Foleyet',-82.441190,48.236410,'CAN','Ontario',' CA-ON ',' Ivanhoe ',11.3,NULL,NULL,'','',true), + ('Fort Albany (Ontario CAN)','Fort Albany',-81.661330,52.306360,'CAN','Ontario',' CA-ON ',' Kinosheo River ',72.2,NULL,NULL,'','',true), + ('Fort Frances (Ontario CAN)','Fort Frances',-93.444220,48.656920,'CAN','Ontario',' CA-ON ',' Rainy Lake ',32.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Fort Hope (Ontario CAN)','Fort Hope',-87.851480,51.573440,'CAN','Ontario',' CA-ON ',' Eabamet Lake ',4.5,NULL,NULL,'','',true), + ('Fort Severn (Ontario CAN)','Fort Severn',-87.672000,55.998650,'CAN','Ontario',' CA-ON ',' Shagamu River ',82.8,NULL,NULL,'','',true), + ('Geraldton (Ontario CAN)','Geraldton',-86.956810,49.763600,'CAN','Ontario',' CA-ON ',' Long Lake ',23.3,NULL,NULL,'','',true), + ('Goderich (Ontario CAN)','Goderich',-81.664950,43.744970,'CAN','Ontario',' CA-ON ',' Maitland River ',31.8,NULL,NULL,'','',true), + ('Gogama (Ontario CAN)','Gogama',-81.766800,47.660510,'CAN','Ontario',' CA-ON ',' Rush Lake ',34.8,NULL,NULL,'','',true), + ('Greater Sudbury (Ontario CAN)','Greater Sudbury',-80.922400,46.459770,'CAN','Ontario',' CA-ON ',' Wanapitei River ',26.0,NULL,NULL,'','',true), + ('Guelph (Ontario CAN)','Guelph',-80.277430,43.598690,'CAN','Ontario',' CA-ON ',' Maitland River ',86.9,NULL,NULL,'','',true), + ('Haileybury (Ontario CAN)','Haileybury',-79.627180,47.409880,'CAN','Ontario',' CA-ON ',' Lady Evelyn Lake ',39.8,NULL,NULL,'','',true), + ('Hamilton (Ontario CAN)','Hamilton',-79.843320,43.268980,'CAN','Ontario',' CA-ON ',' Welland Canal ',53.8,NULL,NULL,'','',true), + ('Hearst (Ontario CAN)','Hearst',-83.723690,49.709080,'CAN','Ontario',' CA-ON ',' Missinaibi ',50.2,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Hornepayne (Ontario CAN)','Hornepayne',-84.811880,49.213810,'CAN','Ontario',' CA-ON ',' Nagagami Lake ',28.6,NULL,NULL,'','',true), + ('Huntsville (Ontario CAN)','Huntsville',-79.244070,45.365250,'CAN','Ontario',' CA-ON ',' North Branch Muskoka River ',32.8,NULL,NULL,'','',true), + ('Iroquois Falls (Ontario CAN)','Iroquois Falls',-80.747690,48.736650,'CAN','Ontario',' CA-ON ',' Frederick House Lake ',16.5,NULL,NULL,'','',true), + ('Kapuskasing (Ontario CAN)','Kapuskasing',-82.410880,49.458740,'CAN','Ontario',' CA-ON ',' Opasatika River ',42.5,NULL,NULL,'','',true), + ('Kasabonika (Ontario CAN)','Kasabonika',-88.672270,53.527170,'CAN','Ontario',' CA-ON ',' Asheweig River ',15.4,NULL,NULL,'','',true), + ('Kenora (Ontario CAN)','Kenora',-94.371020,49.736440,'CAN','Ontario',' CA-ON ',' Dryberry Lake ',42.2,NULL,NULL,'','',true), + ('Kincardine (Ontario CAN)','Kincardine',-81.589740,44.160330,'CAN','Ontario',' CA-ON ',' Maitland River ',41.2,NULL,NULL,'','',true), + ('Kingston (Ontario CAN)','Kingston',-76.499010,44.268390,'CAN','Ontario',' CA-ON ',' Big Rideau Lake ',57.6,NULL,NULL,'','',true), + ('Kirkland Lake (Ontario CAN)','Kirkland Lake',-80.035130,48.140850,'CAN','Ontario',' CA-ON ',' Round Lake ',12.6,NULL,NULL,'','',true), + ('Kitchener (Ontario CAN)','Kitchener',-80.519940,43.412720,'CAN','Ontario',' CA-ON ',' Maitland River ',79.6,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Lansdowne House (Ontario CAN)','Lansdowne House',-87.933900,52.155090,'CAN','Ontario',' CA-ON ',' Kabania Lake ',28.6,NULL,NULL,'','',true), + ('Little Current (Ontario CAN)','Little Current',-81.956900,45.928960,'CAN','Ontario',' CA-ON ',' Lake Manitou ',16.6,NULL,NULL,'','',true), + ('London (Ontario CAN)','London',-81.212280,42.923410,'CAN','Ontario',' CA-ON ',' Thames River ',13.2,NULL,NULL,'','',true), + ('Longlac (Ontario CAN)','Longlac',-86.522690,49.756560,'CAN','Ontario',' CA-ON ',' McKay Lake ',17.1,NULL,NULL,'','',true), + ('Manitouwadge (Ontario CAN)','Manitouwadge',-85.852790,49.164500,'CAN','Ontario',' CA-ON ',' Pic River ',25.7,NULL,NULL,'','',true), + ('Marathon (Ontario CAN)','Marathon',-86.328100,48.704500,'CAN','Ontario',' CA-ON ',' Pic River ',51.5,NULL,NULL,'','',true), + ('Mattawa (Ontario CAN)','Mattawa',-78.662480,46.247870,'CAN','Ontario',' CA-ON ',' Opeongo Lake ',61.3,NULL,NULL,'','',true), + ('Midland (Ontario CAN)','Midland',-79.865570,44.711050,'CAN','Ontario',' CA-ON ',' Lake Muskoka ',44.7,NULL,NULL,'','',true), + ('Moosonee (Ontario CAN)','Moosonee',-80.617870,51.285470,'CAN','Ontario',' CA-ON ',' Moose ',71.0,NULL,NULL,'','',true), + ('Nakina (Ontario CAN)','Nakina',-86.741990,50.201260,'CAN','Ontario',' CA-ON ',' Esnagami Lake ',18.3,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('New Liskeard (Ontario CAN)','New Liskeard',-79.687390,47.547140,'CAN','Ontario',' CA-ON ',' Lady Evelyn Lake ',40.6,NULL,NULL,'','',true), + ('Niagara Falls (Ontario CAN)','Niagara Falls',-79.084780,43.107640,'CAN','Ontario',' CA-ON ',' Niagara ',7.1,NULL,NULL,'','',true), + ('Nipigon (Ontario CAN)','Nipigon',-88.273200,49.057920,'CAN','Ontario',' CA-ON ',' Black Sturgeon River ',19.5,NULL,NULL,'','',true), + ('North Bay (Ontario CAN)','North Bay',-79.422970,46.296790,'CAN','Ontario',' CA-ON ',' Lake Nipissing ',41.7,NULL,NULL,'','',true), + ('Orillia (Ontario CAN)','Orillia',-79.476140,44.601140,'CAN','Ontario',' CA-ON ',' Lake Simcoe ',14.5,NULL,NULL,'','',true), + ('Oshawa (Ontario CAN)','Oshawa',-78.875590,43.926480,'CAN','Ontario',' CA-ON ',' Lake Scugog ',30.9,NULL,NULL,'','',true), + ('Osnaburgh House (Ontario CAN)','Osnaburgh House',-90.235940,51.222320,'CAN','Ontario',' CA-ON ',' Kawinogans River ',31.5,NULL,NULL,'','',true), + ('Ottawa (Ontario CAN)','Ottawa',-75.667250,45.392910,'CAN','Ontario',' CA-ON ',' South Nation River ',39.1,NULL,NULL,'','',true), + ('Owen Sound (Ontario CAN)','Owen Sound',-80.952170,44.541910,'CAN','Ontario',' CA-ON ',' Saugeen River ',29.7,NULL,NULL,'','',true), + ('Parry Sound (Ontario CAN)','Parry Sound',-79.935980,45.327830,'CAN','Ontario',' CA-ON ',' Lake Rosseau ',27.2,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Peawanuck (Ontario CAN)','Peawanuck',-85.457910,55.058280,'CAN','Ontario',' CA-ON ',' Sutton Lake ',96.9,NULL,NULL,'','',true), + ('Pembroke (Ontario CAN)','Pembroke',-77.185300,45.812550,'CAN','Ontario',' CA-ON ',' Ottawa ',27.3,NULL,NULL,'','',true), + ('Petawawa (Ontario CAN)','Petawawa',-77.380990,45.945720,'CAN','Ontario',' CA-ON ',' Ottawa ',21.5,NULL,NULL,'','',true), + ('Peterborough (Ontario CAN)','Peterborough',-78.375130,44.304270,'CAN','Ontario',' CA-ON ',' Chemong Lake ',17.7,NULL,NULL,'','',true), + ('Pikangikum (Ontario CAN)','Pikangikum',-93.974980,51.837360,'CAN','Ontario',' CA-ON ',' McInnes Lake ',47.4,NULL,NULL,'','',true), + ('Quinte West (Ontario CAN)','Quinte West',-77.540660,44.131910,'CAN','Ontario',' CA-ON ',' Trent River ',24.5,NULL,NULL,'','',true), + ('Rainy River (Ontario CAN)','Rainy River',-94.485860,48.750710,'CAN','Ontario',' CA-ON ',' Lake of the Woods ',67.9,NULL,NULL,'','',true), + ('Red Lake (Ontario CAN)','Red Lake',-93.765400,50.997060,'CAN','Ontario',' CA-ON ',' Gullrock Lake ',6.6,NULL,NULL,'','',true), + ('Renfrew (Ontario CAN)','Renfrew',-76.681000,45.495330,'CAN','Ontario',' CA-ON ',' Madawaska River ',25.6,NULL,NULL,'','',true), + ('Sandy Lake (Ontario CAN)','Sandy Lake',-93.393010,53.064830,'CAN','Ontario',' CA-ON ',' Sandy Lake ',34.1,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Sarnia (Ontario CAN)','Sarnia',-82.380250,42.952570,'CAN','Ontario',' CA-ON ',' St Clair ',22.1,NULL,NULL,'','',true), + ('Sault Ste Marie (Ontario CAN)','Sault Ste Marie',-84.347080,46.561430,'CAN','Ontario',' CA-ON ',' St Marys River ',13.8,NULL,NULL,'','',true), + ('Sioux Lookout (Ontario CAN)','Sioux Lookout',-91.891980,50.101760,'CAN','Ontario',' CA-ON ',' Minnitaki Lake ',12.3,NULL,NULL,'','',true), + ('Smiths Falls (Ontario CAN)','Smiths Falls',-76.013260,44.942690,'CAN','Ontario',' CA-ON ',' Rideau River ',6.8,NULL,NULL,'','',true), + ('Smooth Rock Falls (Ontario CAN)','Smooth Rock Falls',-81.997580,49.390000,'CAN','Ontario',' CA-ON ',' Groundhog ',31.4,NULL,NULL,'','',true), + ('St Catharines (Ontario CAN)','St Catharines',-79.179970,43.179150,'CAN','Ontario',' CA-ON ',' Niagara ',10.0,NULL,NULL,'','',true), + ('Terrace Bay (Ontario CAN)','Terrace Bay',-87.072010,48.827560,'CAN','Ontario',' CA-ON ',' Aguasabon River ',17.4,NULL,NULL,'','',true), + ('Thessalon (Ontario CAN)','Thessalon',-83.465270,46.313550,'CAN','Ontario',' CA-ON ',' Mississagi River ',36.5,NULL,NULL,'','',true), + ('Thunder Bay (Ontario CAN)','Thunder Bay',-89.204930,48.420380,'CAN','Ontario',' CA-ON ',' Dog River ',48.4,NULL,NULL,'','',true), + ('Timmins (Ontario CAN)','Timmins',-81.334100,48.488480,'CAN','Ontario',' CA-ON ',' Mattagami River ',25.1,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Toronto (Ontario CAN)','Toronto',-79.394260,43.693590,'CAN','Ontario',' CA-ON ',' Niagara ',64.5,NULL,NULL,'','',true), + ('Wawa (Ontario CAN)','Wawa',-84.728320,48.049380,'CAN','Ontario',' CA-ON ',' Magpie River ',15.9,NULL,NULL,'','',true), + ('Weagamow Lake (Ontario CAN)','Weagamow Lake',-91.215450,52.979470,'CAN','Ontario',' CA-ON ',' Weagamow Lake ',14.8,NULL,NULL,'','',true), + ('Webequie (Ontario CAN)','Webequie',-87.391060,52.956090,'CAN','Ontario',' CA-ON ',' Winisk Lake ',0.8,NULL,NULL,'','',true), + ('White River (Ontario CAN)','White River',-85.223830,48.560630,'CAN','Ontario',' CA-ON ',' White Lake ',38.7,NULL,NULL,'','',true), + ('Windsor (Ontario CAN)','Windsor',-82.961390,42.256970,'CAN','Ontario',' CA-ON ',' Lake Saint Clair ',31.2,NULL,NULL,'','',true), + ('Charlottetown (Prince Edward Island CAN)','Charlottetown',-63.187690,46.279400,'CAN','Prince Edward Island',' CA-PE ',' Saint Marys ',131.9,NULL,NULL,'','',true), + ('Summerside (Prince Edward Island CAN)','Summerside',-63.807960,46.411420,'CAN','Prince Edward Island',' CA-PE ',' Petitcodiac River ',106.9,NULL,NULL,'','',true), + ('Akulivik (Quebec CAN)','Akulivik',-78.104850,60.827450,'CAN','Quebec',' CA-QC ',' Rivire Sorehead ',67.5,NULL,NULL,'','',true), + ('Alma (Quebec CAN)','Alma',-71.655340,48.524760,'CAN','Quebec',' CA-QC ',' Lac Saint Jean ',28.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Amos (Quebec CAN)','Amos',-78.062280,48.573100,'CAN','Quebec',' CA-QC ',' Lac La Motte ',17.7,NULL,NULL,'','',true), + ('Amqui (Quebec CAN)','Amqui',-67.448000,48.453940,'CAN','Quebec',' CA-QC ',' Lac Matapdia ',15.7,NULL,NULL,'','',true), + ('Baie Comeau (Quebec CAN)','Baie Comeau',-68.162800,49.227190,'CAN','Quebec',' CA-QC ',' Lac Matapdia ',85.3,NULL,NULL,'','',true), + ('Baie Saint Paul (Quebec CAN)','Baie Saint Paul',-70.492900,47.441230,'CAN','Quebec',' CA-QC ',' Rivire Jacques Cartier ',74.9,NULL,NULL,'','',true), + ('Blanc Sablon (Quebec CAN)','Blanc Sablon',-57.193980,51.431330,'CAN','Quebec',' CA-QC ',' Rivire Napetipi ',66.3,NULL,NULL,'','',true), + ('Cabano (Quebec CAN)','Cabano',-68.881540,47.607760,'CAN','Quebec',' CA-QC ',' Lac Tacmiscouata ',9.3,NULL,NULL,'','',true), + ('Cap aux Meules (Quebec CAN)','Cap aux Meules',-61.822210,47.382430,'CAN','Quebec',' CA-QC ',' Northeast Margaree River ',121.4,NULL,NULL,'','',true), + ('Chapais (Quebec CAN)','Chapais',-74.879810,49.778570,'CAN','Quebec',' CA-QC ',' Rivire Obatogamau ',10.2,NULL,NULL,'','',true), + ('Chibougamau (Quebec CAN)','Chibougamau',-74.358100,49.912170,'CAN','Quebec',' CA-QC ',' Lac Obatogamau ',37.2,NULL,NULL,'','',true), + ('Chisasibi (Quebec CAN)','Chisasibi',-78.910520,53.784880,'CAN','Quebec',' CA-QC ',' Rivire au Castor ',51.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Dolbeau Mistassini (Quebec CAN)','Dolbeau Mistassini',-72.294580,48.843990,'CAN','Quebec',' CA-QC ',' Lac Saint Jean ',33.8,NULL,NULL,'','',true), + ('Drummondville (Quebec CAN)','Drummondville',-72.413100,45.871900,'CAN','Quebec',' CA-QC ',' Rivire Nicolet ',32.1,NULL,NULL,'','',true), + ('Eastmain (Quebec CAN)','Eastmain',-78.477940,52.215670,'CAN','Quebec',' CA-QC ',' Rivire Jolicoeur ',37.2,NULL,NULL,'','',true), + ('Fermont (Quebec CAN)','Fermont',-67.126730,52.814930,'CAN','Quebec',' CA-QC ',' Lac Opocopa ',43.4,NULL,NULL,'','',true), + ('Forestville (Quebec CAN)','Forestville',-69.140860,48.771090,'CAN','Quebec',' CA-QC ',' Rivire Portneuf ',59.6,NULL,NULL,'','',true), + ('Gaspe (Quebec CAN)','Gaspe',-64.550910,48.827540,'CAN','Quebec',' CA-QC ',' Rivire York ',45.5,NULL,NULL,'','',true), + ('Gatineau (Quebec CAN)','Gatineau',-75.763610,45.492000,'CAN','Quebec',' CA-QC ',' South Nation River ',51.2,NULL,NULL,'','',true), + ('Granby (Quebec CAN)','Granby',-72.942220,45.378100,'CAN','Quebec',' CA-QC ',' Rivire Yamaska ',22.4,NULL,NULL,'','',true), + ('Havre Saint Pierre (Quebec CAN)','Havre Saint Pierre',-63.572460,50.254510,'CAN','Quebec',' CA-QC ',' Rivire Jupiter ',79.7,NULL,NULL,'','',true), + ('Inukjuak (Quebec CAN)','Inukjuak',-78.144060,58.482710,'CAN','Quebec',' CA-QC ',' Rivire Innuksuac ',17.6,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Ivujivik (Quebec CAN)','Ivujivik',-77.911760,62.413910,'CAN','Quebec',' CA-QC ',' Rivire Kovik ',111.2,NULL,NULL,'','',true), + ('Joliette (Quebec CAN)','Joliette',-73.430150,46.069770,'CAN','Quebec',' CA-QC ',' Rivire LAssomption ',17.4,NULL,NULL,'','',true), + ('Joutel (Quebec CAN)','Joutel',-78.443550,49.449350,'CAN','Quebec',' CA-QC ',' Harricana ',23.1,NULL,NULL,'','',true), + ('Kangiqsualujjuaq (Quebec CAN)','Kangiqsualujjuaq',-65.999310,58.783700,'CAN','Quebec',' CA-QC ',' Rivire Koroc ',84.8,NULL,NULL,'','',true), + ('Kangiqsujuaq (Quebec CAN)','Kangiqsujuaq',-71.910070,61.597260,'CAN','Quebec',' CA-QC ',' Rivire Vachon ',100.5,NULL,NULL,'','',true), + ('Kangirsuk (Quebec CAN)','Kangirsuk',-70.020250,60.050740,'CAN','Quebec',' CA-QC ',' Rivire Brochant ',25.5,NULL,NULL,'','',true), + ('Kuujjuaq (Quebec CAN)','Kuujjuaq',-68.387960,58.138710,'CAN','Quebec',' CA-QC ',' Lac Gabriel ',20.7,NULL,NULL,'','',true), + ('Kuujjuarapik (Quebec CAN)','Kuujjuarapik',-77.632510,55.300210,'CAN','Quebec',' CA-QC ',' Rivire Vauquelin ',54.3,NULL,NULL,'','',true), + ('La Malbaie (Quebec CAN)','La Malbaie',-70.172910,47.661950,'CAN','Quebec',' CA-QC ',' Lac Tacmiscouata ',100.6,NULL,NULL,'','',true), + ('La Pocatiere (Quebec CAN)','La Pocatiere',-70.077210,47.269080,'CAN','Quebec',' CA-QC ',' Allagash River ',78.2,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('La Sarre (Quebec CAN)','La Sarre',-79.225240,48.840420,'CAN','Quebec',' CA-QC ',' Rivire La Sarre ',5.7,NULL,NULL,'','',true), + ('La Tabatiere (Quebec CAN)','La Tabatiere',-59.016130,50.863120,'CAN','Quebec',' CA-QC ',' Little Mecatina River ',39.8,NULL,NULL,'','',true), + ('La Tuque (Quebec CAN)','La Tuque',-72.710330,47.408240,'CAN','Quebec',' CA-QC ',' St Maurice ',31.4,NULL,NULL,'','',true), + ('Lebel sur Quevillon (Quebec CAN)','Lebel sur Quevillon',-76.986920,49.041260,'CAN','Quebec',' CA-QC ',' Bell ',35.8,NULL,NULL,'','',true), + ('Levis (Quebec CAN)','Levis',-71.067340,46.717330,'CAN','Quebec',' CA-QC ',' Rivire Jacques Cartier ',63.3,NULL,NULL,'','',true), + ('Maniwaki (Quebec CAN)','Maniwaki',-76.054010,46.390100,'CAN','Quebec',' CA-QC ',' Gatineau ',25.4,NULL,NULL,'','',true), + ('Matagami (Quebec CAN)','Matagami',-77.684680,49.736650,'CAN','Quebec',' CA-QC ',' Lac Grasset ',42.8,NULL,NULL,'','',true), + ('Matane (Quebec CAN)','Matane',-67.530350,48.796270,'CAN','Quebec',' CA-QC ',' Lac Matapdia ',26.8,NULL,NULL,'','',true), + ('Mistissini (Quebec CAN)','Mistissini',-73.886640,50.381120,'CAN','Quebec',' CA-QC ',' Lake Mistassini ',51.5,NULL,NULL,'','',true), + ('Mont Joli (Quebec CAN)','Mont Joli',-68.188720,48.583280,'CAN','Quebec',' CA-QC ',' Lac Matapdia ',44.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Mont Laurier (Quebec CAN)','Mont Laurier',-75.512310,46.577070,'CAN','Quebec',' CA-QC ',' Rivire du Livre ',14.9,NULL,NULL,'','',true), + ('Montmagny (Quebec CAN)','Montmagny',-70.494280,46.921890,'CAN','Quebec',' CA-QC ',' Rivire Jacques Cartier ',79.1,NULL,NULL,'','',true), + ('Montreal (Quebec CAN)','Montreal',-73.624440,45.520590,'CAN','Quebec',' CA-QC ',' Richelieu ',32.2,NULL,NULL,'','',true), + ('Natashquan (Quebec CAN)','Natashquan',-61.783440,50.184290,'CAN','Quebec',' CA-QC ',' Lac Musquaro ',68.6,NULL,NULL,'','',true), + ('Nemiscau (Quebec CAN)','Nemiscau',-76.968910,51.370950,'CAN','Quebec',' CA-QC ',' Lac Jolliet ',20.3,NULL,NULL,'','',true), + ('New Richmond (Quebec CAN)','New Richmond',-65.856130,48.205520,'CAN','Quebec',' CA-QC ',' Rivire Bonaventure ',36.0,NULL,NULL,'','',true), + ('Parent (Quebec CAN)','Parent',-74.643500,47.952450,'CAN','Quebec',' CA-QC ',' Rivire Bazin ',29.5,NULL,NULL,'','',true), + ('Perce (Quebec CAN)','Perce',-64.295630,48.505410,'CAN','Quebec',' CA-QC ',' Rivire York ',76.5,NULL,NULL,'','',true), + ('Port Cartier (Quebec CAN)','Port Cartier',-66.801900,50.060120,'CAN','Quebec',' CA-QC ',' Rivire aux Rochers ',36.5,NULL,NULL,'','',true), + ('Puvirnituq (Quebec CAN)','Puvirnituq',-77.373740,60.052340,'CAN','Quebec',' CA-QC ',' Lac de Puvirnituq ',12.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Quaqtaq (Quebec CAN)','Quaqtaq',-69.593000,61.027890,'CAN','Quebec',' CA-QC ',' Rivire Latourette ',51.2,NULL,NULL,'','',true), + ('Quebec (Quebec CAN)','Quebec',-71.279140,46.813760,'CAN','Quebec',' CA-QC ',' Rivire Jacques Cartier ',47.6,NULL,NULL,'','',true), + ('Radisson (Quebec CAN)','Radisson',-77.636070,53.775900,'CAN','Quebec',' CA-QC ',' Lac Yasinski ',56.0,NULL,NULL,'','',true), + ('Rimouski (Quebec CAN)','Rimouski',-68.476770,48.431360,'CAN','Quebec',' CA-QC ',' Lac Matapdia ',66.7,NULL,NULL,'','',true), + ('Riviere du Loup (Quebec CAN)','Riviere du Loup',-69.463860,47.809600,'CAN','Quebec',' CA-QC ',' Lac Tacmiscouata ',49.4,NULL,NULL,'','',true), + ('Roberval (Quebec CAN)','Roberval',-72.261990,48.484720,'CAN','Quebec',' CA-QC ',' Lac Saint Jean ',22.2,NULL,NULL,'','',true), + ('Rouyn Noranda (Quebec CAN)','Rouyn Noranda',-79.048970,48.257780,'CAN','Quebec',' CA-QC ',' Rivire Kinojvis ',22.6,NULL,NULL,'','',true), + ('Saguenay (Quebec CAN)','Saguenay',-71.226960,48.406560,'CAN','Quebec',' CA-QC ',' Rivire Shipshaw ',53.0,NULL,NULL,'','',true), + ('Saint Augustin (Quebec CAN)','Saint Augustin',-58.608590,51.258680,'CAN','Quebec',' CA-QC ',' Rivire Napetipi ',50.7,NULL,NULL,'','',true), + ('Saint Felicien (Quebec CAN)','Saint Felicien',-72.411480,48.616560,'CAN','Quebec',' CA-QC ',' Lac Saint Jean ',29.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Saint Georges (Quebec CAN)','Saint Georges',-70.576380,46.078460,'CAN','Quebec',' CA-QC ',' Rivire Chaudire ',24.5,NULL,NULL,'','',true), + ('Sainte Anne des Monts (Quebec CAN)','Sainte Anne des Monts',-66.445490,49.084620,'CAN','Quebec',' CA-QC ',' Rivire Cascapdia ',59.8,NULL,NULL,'','',true), + ('Salaberry de Valleyfield (Quebec CAN)','Salaberry de Valleyfield',-74.256050,45.156980,'CAN','Quebec',' CA-QC ',' Saint Lawrence ',74.8,NULL,NULL,'','',true), + ('Salluit (Quebec CAN)','Salluit',-75.588100,62.184870,'CAN','Quebec',' CA-QC ',' Lac Vanasse ',40.0,NULL,NULL,'','',true), + ('Schefferville (Quebec CAN)','Schefferville',-66.839130,54.807050,'CAN','Quebec',' CA-QC ',' McPhadyen River ',71.7,NULL,NULL,'','',true), + ('Senneterre (Quebec CAN)','Senneterre',-77.259130,48.423300,'CAN','Quebec',' CA-QC ',' Rivire Bell ',2.6,NULL,NULL,'','',true), + ('Sept Iles (Quebec CAN)','Sept Iles',-66.274070,50.250200,'CAN','Quebec',' CA-QC ',' Rivire aux Rochers ',60.9,NULL,NULL,'','',true), + ('Shawinigan (Quebec CAN)','Shawinigan',-72.745230,46.552740,'CAN','Quebec',' CA-QC ',' Rivire Batiscan ',53.7,NULL,NULL,'','',true), + ('Sherbrooke (Quebec CAN)','Sherbrooke',-71.898520,45.375110,'CAN','Quebec',' CA-QC ',' Lac Memphremagog ',39.5,NULL,NULL,'','',true), + ('Sorel Tracy (Quebec CAN)','Sorel Tracy',-73.018710,46.026060,'CAN','Quebec',' CA-QC ',' Rivire LAssomption ',48.6,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Temiscaming (Quebec CAN)','Temiscaming',-79.073060,46.746870,'CAN','Quebec',' CA-QC ',' Lake Kipawa ',24.5,NULL,NULL,'','',true), + ('Thetford Mines (Quebec CAN)','Thetford Mines',-71.282300,46.051760,'CAN','Quebec',' CA-QC ',' Lac Saint Franacois ',13.6,NULL,NULL,'','',true), + ('Trois Rivieres (Quebec CAN)','Trois Rivieres',-72.502090,46.405750,'CAN','Quebec',' CA-QC ',' Rivire Nicolet ',53.6,NULL,NULL,'','',true), + ('Umiujaq (Quebec CAN)','Umiujaq',-76.512400,56.573440,'CAN','Quebec',' CA-QC ',' Rivire du Nord ',41.5,NULL,NULL,'','',true), + ('Val dOr (Quebec CAN)','Val dOr',-77.818120,48.085220,'CAN','Quebec',' CA-QC ',' Lac de Montigny ',9.9,NULL,NULL,'','',true), + ('Victoriaville (Quebec CAN)','Victoriaville',-72.005360,46.059780,'CAN','Quebec',' CA-QC ',' Rivire Nicolet ',5.7,NULL,NULL,'','',true), + ('Ville Marie (Quebec CAN)','Ville Marie',-79.352190,47.316240,'CAN','Quebec',' CA-QC ',' Lac des Quinze ',35.0,NULL,NULL,'','',true), + ('Waskaganish (Quebec CAN)','Waskaganish',-78.731760,51.461820,'CAN','Quebec',' CA-QC ',' Rivire Jolicoeur ',55.5,NULL,NULL,'','',true), + ('Wemindji (Quebec CAN)','Wemindji',-78.863270,53.020860,'CAN','Quebec',' CA-QC ',' Rivire Maquatua ',38.9,NULL,NULL,'','',true), + ('Assiniboia (Saskatchewan CAN)','Assiniboia',-105.987850,49.606520,'CAN','Saskatchewan',' CA-SK ',' Fife Lake ',40.6,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Biggar (Saskatchewan CAN)','Biggar',-107.993120,52.077970,'CAN','Saskatchewan',' CA-SK ',' Eagle Creek ',7.5,NULL,NULL,'','',true), + ('Buffalo Narrows (Saskatchewan CAN)','Buffalo Narrows',-108.479750,55.852340,'CAN','Saskatchewan',' CA-SK ',' Kazan Lake ',33.6,NULL,NULL,'','',true), + ('Canora (Saskatchewan CAN)','Canora',-102.462820,51.669460,'CAN','Saskatchewan',' CA-SK ',' Little Quill Lake ',113.6,NULL,NULL,'','',true), + ('Carlyle (Saskatchewan CAN)','Carlyle',-102.299880,49.650820,'CAN','Saskatchewan',' CA-SK ',' Moose Mountain Creek ',39.3,NULL,NULL,'','',true), + ('Coronach (Saskatchewan CAN)','Coronach',-105.579800,49.216260,'CAN','Saskatchewan',' CA-SK ',' Girard Creek ',8.9,NULL,NULL,'','',true), + ('Cumberland House (Saskatchewan CAN)','Cumberland House',-102.197010,53.928030,'CAN','Saskatchewan',' CA-SK ',' Saskatchewan River ',30.4,NULL,NULL,'','',true), + ('Davidson (Saskatchewan CAN)','Davidson',-106.080330,51.308280,'CAN','Saskatchewan',' CA-SK ',' Last Mountain Lake ',63.8,NULL,NULL,'','',true), + ('Deschambault Lake (Saskatchewan CAN)','Deschambault Lake',-103.339790,54.853290,'CAN','Saskatchewan',' CA-SK ',' Jan Lake ',28.4,NULL,NULL,'','',true), + ('Esterhazy (Saskatchewan CAN)','Esterhazy',-101.949030,50.675730,'CAN','Saskatchewan',' CA-SK ',' Pipestone Creek ',85.8,NULL,NULL,'','',true), + ('Estevan (Saskatchewan CAN)','Estevan',-102.971190,49.161370,'CAN','Saskatchewan',' CA-SK ',' Long Creek ',40.5,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Fond du Lac (Saskatchewan CAN)','Fond du Lac',-107.257340,59.377420,'CAN','Saskatchewan',' CA-SK ',' Richards Lake ',22.8,NULL,NULL,'','',true), + ('Fort QuAppelle (Saskatchewan CAN)','Fort QuAppelle',-103.765620,50.783040,'CAN','Saskatchewan',' CA-SK ',' QuAppelle River ',12.6,NULL,NULL,'','',true), + ('Gravelbourg (Saskatchewan CAN)','Gravelbourg',-106.592720,49.954130,'CAN','Saskatchewan',' CA-SK ',' Old Wives Lake ',49.1,NULL,NULL,'','',true), + ('Gull Lake (Saskatchewan CAN)','Gull Lake',-108.634240,50.123500,'CAN','Saskatchewan',' CA-SK ',' Swift Current Creek ',32.4,NULL,NULL,'','',true), + ('Hudson Bay (Saskatchewan CAN)','Hudson Bay',-102.449920,52.888160,'CAN','Saskatchewan',' CA-SK ',' Poplar River ',13.6,NULL,NULL,'','',true), + ('Humboldt (Saskatchewan CAN)','Humboldt',-105.128560,52.248580,'CAN','Saskatchewan',' CA-SK ',' Big Quill Lake ',65.6,NULL,NULL,'','',true), + ('Ile a la Crosse (Saskatchewan CAN)','Ile a la Crosse',-107.892620,55.458890,'CAN','Saskatchewan',' CA-SK ',' Canoe River ',12.3,NULL,NULL,'','',true), + ('Indian Head (Saskatchewan CAN)','Indian Head',-103.661950,50.506310,'CAN','Saskatchewan',' CA-SK ',' QuAppelle River ',23.8,NULL,NULL,'','',true), + ('Kamsack (Saskatchewan CAN)','Kamsack',-101.838190,51.581650,'CAN','Saskatchewan',' CA-SK ',' Big Sandy Lake ',97.8,NULL,NULL,'','',true), + ('Kerrobert (Saskatchewan CAN)','Kerrobert',-109.330270,51.991050,'CAN','Saskatchewan',' CA-SK ',' Red Deer River ',51.7,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Kindersley (Saskatchewan CAN)','Kindersley',-109.293290,51.489450,'CAN','Saskatchewan',' CA-SK ',' Red Deer River ',68.0,NULL,NULL,'','',true), + ('La Loche (Saskatchewan CAN)','La Loche',-109.390410,56.539290,'CAN','Saskatchewan',' CA-SK ',' Lac la Loche ',11.1,NULL,NULL,'','',true), + ('La Ronge (Saskatchewan CAN)','La Ronge',-105.328250,55.108810,'CAN','Saskatchewan',' CA-SK ',' Egg Lake ',14.6,NULL,NULL,'','',true), + ('Leader (Saskatchewan CAN)','Leader',-109.541860,50.880290,'CAN','Saskatchewan',' CA-SK ',' South Saskatchewan ',85.5,NULL,NULL,'','',true), + ('Maple Creek (Saskatchewan CAN)','Maple Creek',-109.450220,49.938230,'CAN','Saskatchewan',' CA-SK ',' Swift Current Creek ',89.5,NULL,NULL,'','',true), + ('Meadow Lake (Saskatchewan CAN)','Meadow Lake',-108.417090,54.161060,'CAN','Saskatchewan',' CA-SK ',' Meadow River ',8.1,NULL,NULL,'','',true), + ('Melfort (Saskatchewan CAN)','Melfort',-104.537160,52.878880,'CAN','Saskatchewan',' CA-SK ',' Ponass Lakes ',68.7,NULL,NULL,'','',true), + ('Melville (Saskatchewan CAN)','Melville',-102.822660,50.959280,'CAN','Saskatchewan',' CA-SK ',' QuAppelle River ',78.5,NULL,NULL,'','',true), + ('Moose Jaw (Saskatchewan CAN)','Moose Jaw',-105.564690,50.393630,'CAN','Saskatchewan',' CA-SK ',' Moose Jaw River ',33.9,NULL,NULL,'','',true), + ('Moosomin (Saskatchewan CAN)','Moosomin',-101.648750,50.154930,'CAN','Saskatchewan',' CA-SK ',' Pipestone Creek ',24.7,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Nipawin (Saskatchewan CAN)','Nipawin',-104.081080,53.385510,'CAN','Saskatchewan',' CA-SK ',' Tobin Lake ',35.0,NULL,NULL,'','',true), + ('North Battleford (Saskatchewan CAN)','North Battleford',-108.329730,52.872000,'CAN','Saskatchewan',' CA-SK ',' Turtlelake River ',55.4,NULL,NULL,'','',true), + ('Outlook (Saskatchewan CAN)','Outlook',-106.900670,51.508450,'CAN','Saskatchewan',' CA-SK ',' Lake Diefenbaker ',70.6,NULL,NULL,'','',true), + ('Patuanak (Saskatchewan CAN)','Patuanak',-107.649640,55.916190,'CAN','Saskatchewan',' CA-SK ',' Lac azle a la Crosse ',36.6,NULL,NULL,'','',true), + ('Pelican Narrows (Saskatchewan CAN)','Pelican Narrows',-102.888910,55.183800,'CAN','Saskatchewan',' CA-SK ',' Jan Lake ',26.4,NULL,NULL,'','',true), + ('Pinehouse Lake (Saskatchewan CAN)','Pinehouse Lake',-106.632190,55.532650,'CAN','Saskatchewan',' CA-SK ',' Besnard Lake ',40.6,NULL,NULL,'','',true), + ('Prince Albert (Saskatchewan CAN)','Prince Albert',-105.775550,53.215270,'CAN','Saskatchewan',' CA-SK ',' Spruce River ',45.7,NULL,NULL,'','',true), + ('Regina (Saskatchewan CAN)','Regina',-104.558360,50.491400,'CAN','Saskatchewan',' CA-SK ',' Moose Jaw River ',48.0,NULL,NULL,'','',true), + ('Rosetown (Saskatchewan CAN)','Rosetown',-107.994080,51.565010,'CAN','Saskatchewan',' CA-SK ',' Pembina River ',32.9,NULL,NULL,'','',true), + ('Rosthern (Saskatchewan CAN)','Rosthern',-106.294400,52.774610,'CAN','Saskatchewan',' CA-SK ',' Spruce River ',93.3,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Sandy Bay (Saskatchewan CAN)','Sandy Bay',-102.258020,55.538070,'CAN','Saskatchewan',' CA-SK ',' Mari Lake ',46.2,NULL,NULL,'','',true), + ('Saskatoon (Saskatchewan CAN)','Saskatoon',-106.678390,52.148370,'CAN','Saskatchewan',' CA-SK ',' Eagle Creek ',93.3,NULL,NULL,'','',true), + ('Shaunavon (Saskatchewan CAN)','Shaunavon',-108.366950,49.665060,'CAN','Saskatchewan',' CA-SK ',' Frenchman River ',31.9,NULL,NULL,'','',true), + ('Southend Reindeer (Saskatchewan CAN)','Southend Reindeer',-103.253170,56.323940,'CAN','Saskatchewan',' CA-SK ',' Wapiskau River ',31.2,NULL,NULL,'','',true), + ('Stanley Mission (Saskatchewan CAN)','Stanley Mission',-104.586890,55.397840,'CAN','Saskatchewan',' CA-SK ',' Lac la Ronge ',28.9,NULL,NULL,'','',true), + ('Stony Rapids (Saskatchewan CAN)','Stony Rapids',-105.931150,59.212960,'CAN','Saskatchewan',' CA-SK ',' Cree River ',25.9,NULL,NULL,'','',true), + ('Swift Current (Saskatchewan CAN)','Swift Current',-107.781460,50.314360,'CAN','Saskatchewan',' CA-SK ',' Gull Lake ',39.5,NULL,NULL,'','',true), + ('Tisdale (Saskatchewan CAN)','Tisdale',-104.043970,52.883600,'CAN','Saskatchewan',' CA-SK ',' Carrot River ',58.4,NULL,NULL,'','',true), + ('Unity (Saskatchewan CAN)','Unity',-109.219600,52.451490,'CAN','Saskatchewan',' CA-SK ',' Red Deer River ',86.0,NULL,NULL,'','',true), + ('Wadena (Saskatchewan CAN)','Wadena',-103.813670,51.964820,'CAN','Saskatchewan',' CA-SK ',' Little Quill Lake ',17.7,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Watrous (Saskatchewan CAN)','Watrous',-105.448550,51.654220,'CAN','Saskatchewan',' CA-SK ',' Last Mountain Lake ',60.3,NULL,NULL,'','',true), + ('Weyburn (Saskatchewan CAN)','Weyburn',-103.838630,49.664660,'CAN','Saskatchewan',' CA-SK ',' Long Creek ',59.5,NULL,NULL,'','',true), + ('Wollaston Lake (Saskatchewan CAN)','Wollaston Lake',-103.167570,58.100240,'CAN','Saskatchewan',' CA-SK ',' Wollaston Lake ',14.4,NULL,NULL,'','',true), + ('Wynyard (Saskatchewan CAN)','Wynyard',-104.165600,51.781990,'CAN','Saskatchewan',' CA-SK ',' Little Quill Lake ',17.3,NULL,NULL,'','',true), + ('Yorkton (Saskatchewan CAN)','Yorkton',-102.467570,51.289130,'CAN','Saskatchewan',' CA-SK ',' QuAppelle River ',118.0,NULL,NULL,'','',true), + ('Beaver Creek (Yukon Territory CAN)','Beaver Creek',-140.710620,62.265090,'CAN','Yukon Territory',' CA-YT ',' Donjek ',61.4,NULL,NULL,'','',true), + ('Carmacks (Yukon Territory CAN)','Carmacks',-136.194370,62.035100,'CAN','Yukon Territory',' CA-YT ',' Little Salmon River ',48.8,NULL,NULL,'','',true), + ('Dawson (Yukon Territory CAN)','Dawson',-139.336420,64.071140,'CAN','Yukon Territory',' CA-YT ',' Klondike River ',75.5,NULL,NULL,'','',true), + ('Faro (Yukon Territory CAN)','Faro',-133.266360,62.250380,'CAN','Yukon Territory',' CA-YT ',' Magundy River ',37.9,NULL,NULL,'','',true), + ('Haines Junction (Yukon Territory CAN)','Haines Junction',-137.525190,60.737740,'CAN','Yukon Territory',' CA-YT ',' Kaskawulsh River ',34.3,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Mayo (Yukon Territory CAN)','Mayo',-135.891560,63.604380,'CAN','Yukon Territory',' CA-YT ',' Mayo River ',18.9,NULL,NULL,'','',true), + ('Old Crow (Yukon Territory CAN)','Old Crow',-139.795760,67.588020,'CAN','Yukon Territory',' CA-YT ',' Old Crow River ',61.9,NULL,NULL,'','',true), + ('Pelly Crossing (Yukon Territory CAN)','Pelly Crossing',-136.610160,62.824030,'CAN','Yukon Territory',' CA-YT ',' Macmillan River ',96.2,NULL,NULL,'','',true), + ('Ross River (Yukon Territory CAN)','Ross River',-132.542650,61.967850,'CAN','Yukon Territory',' CA-YT ',' Tay River ',76.5,NULL,NULL,'','',true), + ('Teslin (Yukon Territory CAN)','Teslin',-132.746860,60.210900,'CAN','Yukon Territory',' CA-YT ',' Teslin ',21.9,NULL,NULL,'','',true), + ('Watson Lake (Yukon Territory CAN)','Watson Lake',-128.752370,60.089970,'CAN','Yukon Territory',' CA-YT ',' Porter Lakes ',12.2,NULL,NULL,'','',true), + ('Whitehorse (Yukon Territory CAN)','Whitehorse',-135.131800,60.709840,'CAN','Yukon Territory',' CA-YT ',' Takhini River ',42.7,NULL,NULL,'','',true), + ('Aguascalientes (Aguascalientes MEX)','Aguascalientes',-102.286780,21.870560,'MEX','Aguascalientes',' MX-AGU ',' Rio Juchipila ',75.8,NULL,NULL,'','',true), + ('Ensenada (Baja California MEX)','Ensenada',-116.584790,31.869060,'MEX','Baja California',' MX-BCN ',' Arroyo sin Nombre ',57.0,NULL,NULL,'','',true), + ('Mexicali (Baja California MEX)','Mexicali',-115.462710,32.603800,'MEX','Baja California',' MX-BCN ',' Laguna Salada ',25.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('San Felipe (Baja California MEX)','San Felipe',-114.901820,31.037490,'MEX','Baja California',' MX-BCN ',' Arroyo San Rafael ',94.3,NULL,NULL,'','',true), + ('San Quintin (Baja California MEX)','San Quintin',-115.904420,30.505300,'MEX','Baja California',' MX-BCN ',' Arroyo San Rafael ',66.6,NULL,NULL,'','',true), + ('Tecate (Baja California MEX)','Tecate',-116.703120,32.538570,'MEX','Baja California',' MX-BCN ',' Arroyo sin Nombre ',32.1,NULL,NULL,'','',true), + ('Tijuana (Baja California MEX)','Tijuana',-116.968190,32.471870,'MEX','Baja California',' MX-BCN ',' Arroyo sin Nombre ',51.9,NULL,NULL,'','',true), + ('Ciudad Constitucion (Baja California Sur MEX)','Ciudad Constitucion',-111.682140,25.048520,'MEX','Baja California Sur',' MX-BCS ',' Arroyo Las Bramonas ',12.7,NULL,NULL,'','',true), + ('Ejido Insurgentes (Baja California Sur MEX)','Ejido Insurgentes',-111.769040,25.254680,'MEX','Baja California Sur',' MX-BCS ',' Arroyo Las Bramonas ',24.5,NULL,NULL,'','',true), + ('La Paz (Baja California Sur MEX)','La Paz',-110.303590,24.102890,'MEX','Baja California Sur',' MX-BCS ',' Arroyo San Jose ',105.2,NULL,NULL,'','',true), + ('Loreto (Baja California Sur MEX)','Loreto',-111.386000,25.987370,'MEX','Baja California Sur',' MX-BCS ',' Arroyo Las Bramonas ',98.8,NULL,NULL,'','',true), + ('San Jose del Cabo (Baja California Sur MEX)','San Jose del Cabo',-109.697900,23.059180,'MEX','Baja California Sur',' MX-BCS ',' Arroyo San Jose ',27.2,NULL,NULL,'','',true), + ('San Lucas (Baja California Sur MEX)','San Lucas',-109.957210,22.920900,'MEX','Baja California Sur',' MX-BCS ',' Arroyo San Jose ',46.1,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Santa Rosalia (Baja California Sur MEX)','Santa Rosalia',-112.281600,27.302100,'MEX','Baja California Sur',' MX-BCS ',' Arroyo Bateque ',90.9,NULL,NULL,'','',true), + ('Todos Santos (Baja California Sur MEX)','Todos Santos',-110.198770,23.444390,'MEX','Baja California Sur',' MX-BCS ',' Arroyo San Jose ',47.3,NULL,NULL,'','',true), + ('Campeche (Campeche MEX)','Campeche',-90.500450,19.832410,'MEX','Campeche',' MX-CAM ',' Caribe ',176.6,NULL,NULL,'','',true), + ('Champoton (Campeche MEX)','Champoton',-90.705470,19.352200,'MEX','Campeche',' MX-CAM ',' Caribe ',122.7,NULL,NULL,'','',true), + ('Ciudad del Carmen (Campeche MEX)','Ciudad del Carmen',-91.818080,18.659500,'MEX','Campeche',' MX-CAM ',' Laguna Atasta ',35.0,NULL,NULL,'','',true), + ('Escarcega (Campeche MEX)','Escarcega',-90.739880,18.605360,'MEX','Campeche',' MX-CAM ',' Caribe ',40.6,NULL,NULL,'','',true), + ('Hopelchen (Campeche MEX)','Hopelchen',-89.843280,19.745900,'MEX','Campeche',' MX-CAM ',' Caribe ',186.6,NULL,NULL,'','',true), + ('Arriaga (Chiapas MEX)','Arriaga',-93.871230,16.227840,'MEX','Chiapas',' MX-CHP ',' La Venta ',48.8,NULL,NULL,'','',true), + ('Comitan (Chiapas MEX)','Comitan',-92.131630,16.240350,'MEX','Chiapas',' MX-CHP ',' Presa de la Angostura ',51.9,NULL,NULL,'','',true), + ('Escuintla (Chiapas MEX)','Escuintla',-92.688490,15.295800,'MEX','Chiapas',' MX-CHP ',' Novillero ',38.2,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Huixtla (Chiapas MEX)','Huixtla',-92.468270,15.140360,'MEX','Chiapas',' MX-CHP ',' Novillero ',67.4,NULL,NULL,'','',true), + ('Ocosingo (Chiapas MEX)','Ocosingo',-92.089320,16.923800,'MEX','Chiapas',' MX-CHP ',' La Sierra ',80.2,NULL,NULL,'','',true), + ('Palenque (Chiapas MEX)','Palenque',-91.941630,17.431460,'MEX','Chiapas',' MX-CHP ',' Usumacinta ',39.9,NULL,NULL,'','',true), + ('Pijijiapan (Chiapas MEX)','Pijijiapan',-93.283150,15.714600,'MEX','Chiapas',' MX-CHP ',' Novillero ',41.0,NULL,NULL,'','',true), + ('San Cristobal de las Casas (Chiapas MEX)','San Cristobal de las Casas',-92.619620,16.734690,'MEX','Chiapas',' MX-CHP ',' La Sierra ',70.7,NULL,NULL,'','',true), + ('Tapachula (Chiapas MEX)','Tapachula',-92.271720,14.903550,'MEX','Chiapas',' MX-CHP ',' Novillero ',100.6,NULL,NULL,'','',true), + ('Tonala (Chiapas MEX)','Tonala',-93.780190,16.094650,'MEX','Chiapas',' MX-CHP ',' La Venta ',60.3,NULL,NULL,'','',true), + ('Tuxtla Gutierrez (Chiapas MEX)','Tuxtla Gutierrez',-93.124820,16.753450,'MEX','Chiapas',' MX-CHP ',' Suchiapa ',38.3,NULL,NULL,'','',true), + ('Bueneventura (Chihuahua MEX)','Bueneventura',-107.478090,29.846330,'MEX','Chihuahua',' MX-CHH ',' Rio Santa Maria ',9.0,NULL,NULL,'','',true), + ('Chihuahua (Chihuahua MEX)','Chihuahua',-106.042520,28.635690,'MEX','Chihuahua',' MX-CHH ',' Arroyo Chuviscar ',16.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Ciudad Camargo (Chihuahua MEX)','Ciudad Camargo',-105.193810,27.685940,'MEX','Chihuahua',' MX-CHH ',' Laguna Los Clavos ',35.2,NULL,NULL,'','',true), + ('Ciudad Juarez (Chihuahua MEX)','Ciudad Juarez',-106.488170,31.704210,'MEX','Chihuahua',' MX-CHH ',' Laguna Santa Mara ',98.1,NULL,NULL,'','',true), + ('Cuauhtemoc (Chihuahua MEX)','Cuauhtemoc',-106.870540,28.409980,'MEX','Chihuahua',' MX-CHH ',' Laguna Bustillos ',19.9,NULL,NULL,'','',true), + ('Delicias (Chihuahua MEX)','Delicias',-105.455250,28.194920,'MEX','Chihuahua',' MX-CHH ',' Conchos ',21.9,NULL,NULL,'','',true), + ('Hidalgo del Parral (Chihuahua MEX)','Hidalgo del Parral',-105.677230,26.926510,'MEX','Chihuahua',' MX-CHH ',' Arroyo Florido ',67.5,NULL,NULL,'','',true), + ('Jimenez (Chihuahua MEX)','Jimenez',-104.914810,27.127200,'MEX','Chihuahua',' MX-CHH ',' Arroyo Florido ',22.3,NULL,NULL,'','',true), + ('Nuevo Casas Grandes (Chihuahua MEX)','Nuevo Casas Grandes',-107.912630,30.407830,'MEX','Chihuahua',' MX-CHH ',' Rio Santa Maria ',77.1,NULL,NULL,'','',true), + ('Ojinaga (Chihuahua MEX)','Ojinaga',-104.393280,29.530940,'MEX','Chihuahua',' MX-CHH ',' Presa Luis L Len (El Granero) ',111.3,NULL,NULL,'','',true), + ('San Juanito (Chihuahua MEX)','San Juanito',-107.601580,27.968340,'MEX','Chihuahua',' MX-CHH ',' Ro Conchos ',38.7,NULL,NULL,'','',true), + ('Villa Ahumada (Chihuahua MEX)','Villa Ahumada',-106.441940,30.853560,'MEX','Chihuahua',' MX-CHH ',' Laguna Santa Mara ',85.7,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Allende (Coahuila de Zaragoza MEX)','Allende',-100.850370,28.363030,'MEX','Coahuila de Zaragoza',' MX-COA ',' San Rodrigo ',65.0,NULL,NULL,'','',true), + ('Ciudad Acuna (Coahuila de Zaragoza MEX)','Ciudad Acuna',-100.939010,29.263780,'MEX','Coahuila de Zaragoza',' MX-COA ',' Amistad Reservoir ',35.2,NULL,NULL,'','',true), + ('Cuatro Cienegas (Coahuila de Zaragoza MEX)','Cuatro Cienegas',-102.106700,26.952120,'MEX','Coahuila de Zaragoza',' MX-COA ',' Rio Salado de los Nadadores ',77.1,NULL,NULL,'','',true), + ('Matamoros (Coahuila de Zaragoza MEX)','Matamoros',-103.226920,25.524090,'MEX','Coahuila de Zaragoza',' MX-COA ',' Rio Nasas ',69.1,NULL,NULL,'','',true), + ('Melchor Muzquiz (Coahuila de Zaragoza MEX)','Melchor Muzquiz',-101.518480,27.874140,'MEX','Coahuila de Zaragoza',' MX-COA ',' Rio Sabinas ',18.1,NULL,NULL,'','',true), + ('Monclova (Coahuila de Zaragoza MEX)','Monclova',-101.426590,26.889660,'MEX','Coahuila de Zaragoza',' MX-COA ',' Rio Salado de los Nadadores ',17.8,NULL,NULL,'','',true), + ('Nueva Rosita (Coahuila de Zaragoza MEX)','Nueva Rosita',-101.190880,27.924860,'MEX','Coahuila de Zaragoza',' MX-COA ',' Rio Sabinas ',15.0,NULL,NULL,'','',true), + ('Parras (Coahuila de Zaragoza MEX)','Parras',-102.182640,25.424140,'MEX','Coahuila de Zaragoza',' MX-COA ',' Rio San Pedro ',81.2,NULL,NULL,'','',true), + ('Piedras Negras (Coahuila de Zaragoza MEX)','Piedras Negras',-100.565500,28.682350,'MEX','Coahuila de Zaragoza',' MX-COA ',' San Rodrigo ',68.8,NULL,NULL,'','',true), + ('Sabinas (Coahuila de Zaragoza MEX)','Sabinas',-101.116510,27.839440,'MEX','Coahuila de Zaragoza',' MX-COA ',' Rio Sabinas ',21.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Saltillo (Coahuila de Zaragoza MEX)','Saltillo',-100.995420,25.433350,'MEX','Coahuila de Zaragoza',' MX-COA ',' Pesqueria ',66.2,NULL,NULL,'','',true), + ('San Pedro de las Colonias (Coahuila de Zaragoza MEX)','San Pedro de las Colonias',-102.991590,25.739800,'MEX','Coahuila de Zaragoza',' MX-COA ',' Rio Nasas ',97.2,NULL,NULL,'','',true), + ('Torreon (Coahuila de Zaragoza MEX)','Torreon',-103.414720,25.553340,'MEX','Coahuila de Zaragoza',' MX-COA ',' Rio Nasas ',50.9,NULL,NULL,'','',true), + ('Colima (Colima MEX)','Colima',-103.725210,19.223450,'MEX','Colima',' MX-COL ',' Coahuayana ',25.6,NULL,NULL,'','',true), + ('Manzanillo (Colima MEX)','Manzanillo',-104.289570,19.054380,'MEX','Colima',' MX-COL ',' Purificacin ',68.9,NULL,NULL,'','',true), + ('Tecoman (Colima MEX)','Tecoman',-103.863690,18.931960,'MEX','Colima',' MX-COL ',' Coahuayana ',50.5,NULL,NULL,'','',true), + ('Canatlan (Durango MEX)','Canatlan',-104.769380,24.534590,'MEX','Durango',' MX-DUR ',' Arroyo El Yerbanis ',19.2,NULL,NULL,'','',true), + ('Durango (Durango MEX)','Durango',-104.651270,24.037590,'MEX','Durango',' MX-DUR ',' Arroyo El Yerbanis ',37.4,NULL,NULL,'','',true), + ('El Salto (Durango MEX)','El Salto',-105.347780,23.801400,'MEX','Durango',' MX-DUR ',' Rio Presidio ',52.8,NULL,NULL,'','',true), + ('Gomez Palacio (Durango MEX)','Gomez Palacio',-103.534960,25.635800,'MEX','Durango',' MX-DUR ',' Rio Nasas ',42.3,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Santiago Papasquiaro (Durango MEX)','Santiago Papasquiaro',-105.439310,25.037200,'MEX','Durango',' MX-DUR ',' Rio Tepehuanes ',23.0,NULL,NULL,'','',true), + ('Tepehuanes (Durango MEX)','Tepehuanes',-105.706070,25.345990,'MEX','Durango',' MX-DUR ',' Rio Tepehuanes ',21.0,NULL,NULL,'','',true), + ('Acambaro (Guanajuato MEX)','Acambaro',-100.733110,20.012830,'MEX','Guanajuato',' MX-GUA ',' Lago Cuitzeo ',37.3,NULL,NULL,'','',true), + ('Celaya (Guanajuato MEX)','Celaya',-100.799980,20.551150,'MEX','Guanajuato',' MX-GUA ',' Guanajuato ',14.8,NULL,NULL,'','',true), + ('Guanajuato (Guanajuato MEX)','Guanajuato',-101.261100,21.025610,'MEX','Guanajuato',' MX-GUA ',' Guanajuato ',56.5,NULL,NULL,'','',true), + ('Irapuato (Guanajuato MEX)','Irapuato',-101.352620,20.692330,'MEX','Guanajuato',' MX-GUA ',' Guanajuato ',48.3,NULL,NULL,'','',true), + ('Leon (Guanajuato MEX)','Leon',-101.653280,21.125830,'MEX','Guanajuato',' MX-GUA ',' Guanajuato ',95.0,NULL,NULL,'','',true), + ('Salamanca (Guanajuato MEX)','Salamanca',-101.182630,20.587110,'MEX','Guanajuato',' MX-GUA ',' Guanajuato ',31.3,NULL,NULL,'','',true), + ('San Miguel de Allende (Guanajuato MEX)','San Miguel de Allende',-100.754970,20.909080,'MEX','Guanajuato',' MX-GUA ',' Guanajuato ',31.7,NULL,NULL,'','',true), + ('Acapulco (Guerrero MEX)','Acapulco',-99.895040,16.878700,'MEX','Guerrero',' MX-GRO ',' Laguna Tres Palos ',22.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Chilpancingo (Guerrero MEX)','Chilpancingo',-99.421670,17.473550,'MEX','Guerrero',' MX-GRO ',' Rio Azul ',15.9,NULL,NULL,'','',true), + ('Ciudad Altamirano (Guerrero MEX)','Ciudad Altamirano',-100.657080,18.349050,'MEX','Guerrero',' MX-GRO ',' Bejucos ',30.4,NULL,NULL,'','',true), + ('Iguala (Guerrero MEX)','Iguala',-99.510690,18.328550,'MEX','Guerrero',' MX-GRO ',' Amacuzac ',27.1,NULL,NULL,'','',true), + ('San Marcos (Guerrero MEX)','San Marcos',-99.386970,16.833350,'MEX','Guerrero',' MX-GRO ',' Omitlan ',35.9,NULL,NULL,'','',true), + ('Taxco (Guerrero MEX)','Taxco',-99.513970,18.431080,'MEX','Guerrero',' MX-GRO ',' Amacuzac ',20.8,NULL,NULL,'','',true), + ('Tecpan (Guerrero MEX)','Tecpan',-100.434180,17.188090,'MEX','Guerrero',' MX-GRO ',' Coyuca ',30.3,NULL,NULL,'','',true), + ('Zihuatanejo (Guerrero MEX)','Zihuatanejo',-101.544220,17.649240,'MEX','Guerrero',' MX-GRO ',' La Laja ',40.9,NULL,NULL,'','',true), + ('Actopan (Hidalgo MEX)','Actopan',-98.958990,20.274630,'MEX','Hidalgo',' MX-HID ',' Lago Tecocomulco ',74.4,NULL,NULL,'','',true), + ('Huejutla (Hidalgo MEX)','Huejutla',-98.415630,21.140510,'MEX','Hidalgo',' MX-HID ',' Tempoal ',9.0,NULL,NULL,'','',true), + ('Pachuca (Hidalgo MEX)','Pachuca',-98.735940,20.111880,'MEX','Hidalgo',' MX-HID ',' Lago Tecocomulco ',44.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Tulancingo (Hidalgo MEX)','Tulancingo',-98.380550,20.085220,'MEX','Hidalgo',' MX-HID ',' Lago Tecocomulco ',25.2,NULL,NULL,'','',true), + ('Ameca (Jalisco MEX)','Ameca',-104.072660,20.538100,'MEX','Jalisco',' MX-JAL ',' Laguna Atotonilco ',53.3,NULL,NULL,'','',true), + ('Autlan (Jalisco MEX)','Autlan',-104.363550,19.756590,'MEX','Jalisco',' MX-JAL ',' Armeria ',25.6,NULL,NULL,'','',true), + ('Ciudad Guzman (Jalisco MEX)','Ciudad Guzman',-103.475790,19.705390,'MEX','Jalisco',' MX-JAL ',' Laguna Sayula ',37.3,NULL,NULL,'','',true), + ('Guadalajara (Jalisco MEX)','Guadalajara',-103.336960,20.627110,'MEX','Jalisco',' MX-JAL ',' Laguna Atotonilco ',43.3,NULL,NULL,'','',true), + ('La Barca (Jalisco MEX)','La Barca',-102.549100,20.308870,'MEX','Jalisco',' MX-JAL ',' Lago de Chapala ',46.8,NULL,NULL,'','',true), + ('Lagos de Moreno (Jalisco MEX)','Lagos de Moreno',-101.912730,21.357260,'MEX','Jalisco',' MX-JAL ',' Ro Verde ',92.3,NULL,NULL,'','',true), + ('Ocotlan (Jalisco MEX)','Ocotlan',-102.817520,20.326880,'MEX','Jalisco',' MX-JAL ',' Lago de Chapala ',21.3,NULL,NULL,'','',true), + ('Puerto Vallarta (Jalisco MEX)','Puerto Vallarta',-105.220120,20.632420,'MEX','Jalisco',' MX-JAL ',' Mascota ',27.4,NULL,NULL,'','',true), + ('San Juan de los Lagos (Jalisco MEX)','San Juan de los Lagos',-102.268110,21.292760,'MEX','Jalisco',' MX-JAL ',' Ro Verde ',56.1,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Sayula (Jalisco MEX)','Sayula',-103.614870,19.854150,'MEX','Jalisco',' MX-JAL ',' Laguna Sayula ',21.8,NULL,NULL,'','',true), + ('Tamazula (Jalisco MEX)','Tamazula',-103.247870,19.687180,'MEX','Jalisco',' MX-JAL ',' Laguna Sayula ',49.2,NULL,NULL,'','',true), + ('Tepatitlan (Jalisco MEX)','Tepatitlan',-102.760330,20.868720,'MEX','Jalisco',' MX-JAL ',' Ro Verde ',18.7,NULL,NULL,'','',true), + ('Tequila (Jalisco MEX)','Tequila',-103.859830,20.879240,'MEX','Jalisco',' MX-JAL ',' Rao Grande de Santiago ',36.7,NULL,NULL,'','',true), + ('Tuxpan (Jalisco MEX)','Tuxpan',-103.348410,19.511800,'MEX','Jalisco',' MX-JAL ',' Coahuayana ',36.6,NULL,NULL,'','',true), + ('Mexico (Mexico MEX)','Mexico',-99.123930,19.443960,'MEX','Mexico',' MX-MEX ',' Lago de Texcoco ',14.6,NULL,NULL,'','',true), + ('Toluca (Mexico MEX)','Toluca',-99.643730,19.306270,'MEX','Mexico',' MX-MEX ',' Lago de Texcoco ',71.2,NULL,NULL,'','',true), + ('Aguililla (Michoacan de Ocampo MEX)','Aguililla',-102.637730,18.793830,'MEX','Michoacan de Ocampo',' MX-MIC ',' Ro Grande ',38.8,NULL,NULL,'','',true), + ('Apatzingan (Michoacan de Ocampo MEX)','Apatzingan',-102.364520,19.108310,'MEX','Michoacan de Ocampo',' MX-MIC ',' Ro Grande ',17.4,NULL,NULL,'','',true), + ('La Piedad (Michoacan de Ocampo MEX)','La Piedad',-102.024780,20.331960,'MEX','Michoacan de Ocampo',' MX-MIC ',' Lago de Pajtzcuaro ',90.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Lazaro Cardenas (Michoacan de Ocampo MEX)','Lazaro Cardenas',-102.217880,17.966260,'MEX','Michoacan de Ocampo',' MX-MIC ',' Toscano ',80.4,NULL,NULL,'','',true), + ('Los Reyes (Michoacan de Ocampo MEX)','Los Reyes',-102.468690,19.606650,'MEX','Michoacan de Ocampo',' MX-MIC ',' Ro Grande ',53.7,NULL,NULL,'','',true), + ('Morelia (Michoacan de Ocampo MEX)','Morelia',-101.210000,19.701870,'MEX','Michoacan de Ocampo',' MX-MIC ',' Lago Cuitzeo ',29.1,NULL,NULL,'','',true), + ('Patzcuaro (Michoacan de Ocampo MEX)','Patzcuaro',-101.604270,19.493990,'MEX','Michoacan de Ocampo',' MX-MIC ',' Lago de Pajtzcuaro ',13.5,NULL,NULL,'','',true), + ('Sahuayo (Michoacan de Ocampo MEX)','Sahuayo',-102.711170,20.070380,'MEX','Michoacan de Ocampo',' MX-MIC ',' Lago de Chapala ',33.3,NULL,NULL,'','',true), + ('Uruapan (Michoacan de Ocampo MEX)','Uruapan',-102.082500,19.405900,'MEX','Michoacan de Ocampo',' MX-MIC ',' Lago de Pajtzcuaro ',52.8,NULL,NULL,'','',true), + ('Zacapu (Michoacan de Ocampo MEX)','Zacapu',-101.779170,19.805660,'MEX','Michoacan de Ocampo',' MX-MIC ',' Lago de Pajtzcuaro ',26.6,NULL,NULL,'','',true), + ('Zamora (Michoacan de Ocampo MEX)','Zamora',-102.260430,19.961070,'MEX','Michoacan de Ocampo',' MX-MIC ',' Lago de Pajtzcuaro ',76.6,NULL,NULL,'','',true), + ('Cuautla (Morelos MEX)','Cuautla',-98.951170,18.819250,'MEX','Morelos',' MX-MOR ',' Nexpa ',41.3,NULL,NULL,'','',true), + ('Cuernavaca (Morelos MEX)','Cuernavaca',-99.221980,18.912110,'MEX','Morelos',' MX-MOR ',' Amacuzac ',46.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Acaponeta (Nayarit MEX)','Acaponeta',-105.388060,22.494610,'MEX','Nayarit',' MX-NAY ',' Laguna Agua Grande ',32.9,NULL,NULL,'','',true), + ('Compostela (Nayarit MEX)','Compostela',-104.886140,21.257350,'MEX','Nayarit',' MX-NAY ',' Ameca ',58.5,NULL,NULL,'','',true), + ('Ixtlan del Rio (Nayarit MEX)','Ixtlan del Rio',-104.435970,21.037520,'MEX','Nayarit',' MX-NAY ',' Ameca ',31.8,NULL,NULL,'','',true), + ('Santiago Ixcuintla (Nayarit MEX)','Santiago Ixcuintla',-105.231410,21.823180,'MEX','Nayarit',' MX-NAY ',' Laguna Agua Brava ',51.6,NULL,NULL,'','',true), + ('Tepic (Nayarit MEX)','Tepic',-104.881610,21.491020,'MEX','Nayarit',' MX-NAY ',' Huaynamota ',51.9,NULL,NULL,'','',true), + ('Tuxpan (Nayarit MEX)','Tuxpan',-105.318780,21.929060,'MEX','Nayarit',' MX-NAY ',' Laguna Agua Brava ',36.7,NULL,NULL,'','',true), + ('China (Nuevo Leon MEX)','China',-99.233490,25.706680,'MEX','Nuevo Leon',' MX-NLE ',' San Lorenzo ',51.7,NULL,NULL,'','',true), + ('Ciudad Anahuac (Nuevo Leon MEX)','Ciudad Anahuac',-100.114600,27.223490,'MEX','Nuevo Leon',' MX-NLE ',' San Juan ',35.5,NULL,NULL,'','',true), + ('Linares (Nuevo Leon MEX)','Linares',-99.566830,24.864020,'MEX','Nuevo Leon',' MX-NLE ',' Rio Salado ',37.5,NULL,NULL,'','',true), + ('Montemorelos (Nuevo Leon MEX)','Montemorelos',-99.815920,25.193340,'MEX','Nuevo Leon',' MX-NLE ',' Rio Salado ',35.7,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Monterrey (Nuevo Leon MEX)','Monterrey',-100.299010,25.664330,'MEX','Nuevo Leon',' MX-NLE ',' Pesqueria ',23.9,NULL,NULL,'','',true), + ('Sabinas Hildalgo (Nuevo Leon MEX)','Sabinas Hildalgo',-100.190480,26.500690,'MEX','Nuevo Leon',' MX-NLE ',' Sabinas ',10.1,NULL,NULL,'','',true), + ('Huajuapan (Oaxaca MEX)','Huajuapan',-97.771150,17.791440,'MEX','Oaxaca',' MX-OAX ',' Tonala ',7.1,NULL,NULL,'','',true), + ('Juchitan (Oaxaca MEX)','Juchitan',-95.019690,16.446140,'MEX','Oaxaca',' MX-OAX ',' Chicapa ',39.9,NULL,NULL,'','',true), + ('Matias Romero (Oaxaca MEX)','Matias Romero',-95.053200,16.872450,'MEX','Oaxaca',' MX-OAX ',' Sarabia ',20.6,NULL,NULL,'','',true), + ('Miahuatlan (Oaxaca MEX)','Miahuatlan',-96.598280,16.330600,'MEX','Oaxaca',' MX-OAX ',' Colotepec ',39.7,NULL,NULL,'','',true), + ('Oaxaca (Oaxaca MEX)','Oaxaca',-96.694270,17.056390,'MEX','Oaxaca',' MX-OAX ',' Rio Grande ',61.1,NULL,NULL,'','',true), + ('Pinotepa Nacional (Oaxaca MEX)','Pinotepa Nacional',-98.095960,16.376480,'MEX','Oaxaca',' MX-OAX ',' Quetzala ',50.9,NULL,NULL,'','',true), + ('Puerto Escondido (Oaxaca MEX)','Puerto Escondido',-97.064090,15.884070,'MEX','Oaxaca',' MX-OAX ',' Colotepec ',34.5,NULL,NULL,'','',true), + ('Salina Cruz (Oaxaca MEX)','Salina Cruz',-95.213930,16.200800,'MEX','Oaxaca',' MX-OAX ',' Chicapa ',73.3,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Tehuantepec (Oaxaca MEX)','Tehuantepec',-95.243050,16.325160,'MEX','Oaxaca',' MX-OAX ',' Chicapa ',67.2,NULL,NULL,'','',true), + ('Tuxtepec (Oaxaca MEX)','Tuxtepec',-96.145780,18.095570,'MEX','Oaxaca',' MX-OAX ',' Papaloapan ',8.1,NULL,NULL,'','',true), + ('Acatlan (Puebla MEX)','Acatlan',-98.060890,18.183330,'MEX','Puebla',' MX-PUE ',' Atoyac ',46.6,NULL,NULL,'','',true), + ('Atlixco (Puebla MEX)','Atlixco',-98.394780,18.975770,'MEX','Puebla',' MX-PUE ',' Presa Manuel vila Camacho ',23.7,NULL,NULL,'','',true), + ('Izucar de Matamoros (Puebla MEX)','Izucar de Matamoros',-98.479480,18.604410,'MEX','Puebla',' MX-PUE ',' Nexpa ',15.3,NULL,NULL,'','',true), + ('Orizaba (Puebla MEX)','Orizaba',-97.360590,18.867110,'MEX','Puebla',' MX-PUE ',' Laguna Totolcingo ',55.1,NULL,NULL,'','',true), + ('Puebla (Puebla MEX)','Puebla',-98.198390,19.071250,'MEX','Puebla',' MX-PUE ',' Presa Manuel vila Camacho ',14.3,NULL,NULL,'','',true), + ('Tehuacan (Puebla MEX)','Tehuacan',-97.452450,18.514720,'MEX','Puebla',' MX-PUE ',' Atoyac ',50.7,NULL,NULL,'','',true), + ('Teziutlan (Puebla MEX)','Teziutlan',-97.372920,19.811070,'MEX','Puebla',' MX-PUE ',' Laguna El Salado ',39.7,NULL,NULL,'','',true), + ('Queretaro (Queretaro de Arteaga MEX)','Queretaro',-100.400850,20.592200,'MEX','Queretaro de Arteaga',' MX-QUE ',' Guanajuato ',51.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('San Juan del Rio (Queretaro de Arteaga MEX)','San Juan del Rio',-100.008020,20.416010,'MEX','Queretaro de Arteaga',' MX-QUE ',' Amajac ',27.1,NULL,NULL,'','',true), + ('Cancun (Quintana Roo MEX)','Cancun',-86.843460,21.062410,'MEX','Quintana Roo',' MX-ROO ',' Rio Hondo ',370.9,NULL,NULL,'','',true), + ('Chetumal (Quintana Roo MEX)','Chetumal',-88.289590,18.524020,'MEX','Quintana Roo',' MX-ROO ',' Rio Hondo ',55.0,NULL,NULL,'','',true), + ('Cozumel (Quintana Roo MEX)','Cozumel',-86.888550,20.493490,'MEX','Quintana Roo',' MX-ROO ',' Rio Hondo ',316.1,NULL,NULL,'','',true), + ('Felipe Carrillo Puerto (Quintana Roo MEX)','Felipe Carrillo Puerto',-88.048800,19.585510,'MEX','Quintana Roo',' MX-ROO ',' Rio Hondo ',166.3,NULL,NULL,'','',true), + ('Cardenas (San Luis Potosi MEX)','Cardenas',-99.532860,22.002430,'MEX','San Luis Potosi',' MX-SLP ',' Valles ',44.5,NULL,NULL,'','',true), + ('Cerritos (San Luis Potosi MEX)','Cerritos',-100.292960,22.435070,'MEX','San Luis Potosi',' MX-SLP ',' Verde ',87.1,NULL,NULL,'','',true), + ('Ciudad Valles (San Luis Potosi MEX)','Ciudad Valles',-99.024600,21.992110,'MEX','San Luis Potosi',' MX-SLP ',' Valles ',45.8,NULL,NULL,'','',true), + ('Ebano (San Luis Potosi MEX)','Ebano',-98.383000,22.226690,'MEX','San Luis Potosi',' MX-SLP ',' Laguna Chila ',10.5,NULL,NULL,'','',true), + ('Matehuala (San Luis Potosi MEX)','Matehuala',-100.648930,23.660740,'MEX','San Luis Potosi',' MX-SLP ',' Purificacin ',127.6,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Rioverde (San Luis Potosi MEX)','Rioverde',-100.021110,21.928590,'MEX','San Luis Potosi',' MX-SLP ',' Verde ',30.5,NULL,NULL,'','',true), + ('San Luis Potosi (San Luis Potosi MEX)','San Luis Potosi',-100.980930,22.154720,'MEX','San Luis Potosi',' MX-SLP ',' Verde ',104.2,NULL,NULL,'','',true), + ('Tamazunchale (San Luis Potosi MEX)','Tamazunchale',-98.779800,21.266590,'MEX','San Luis Potosi',' MX-SLP ',' Moctezuma ',34.0,NULL,NULL,'','',true), + ('Culiacan (Sinaloa MEX)','Culiacan',-107.417680,24.807550,'MEX','Sinaloa',' MX-SIN ',' Rio Culiacan ',13.0,NULL,NULL,'','',true), + ('El Dorado (Sinaloa MEX)','El Dorado',-107.372050,24.327250,'MEX','Sinaloa',' MX-SIN ',' Rio San Lorenzo ',52.9,NULL,NULL,'','',true), + ('El Fuerte (Sinaloa MEX)','El Fuerte',-108.636760,26.405810,'MEX','Sinaloa',' MX-SIN ',' Fuerte ',7.1,NULL,NULL,'','',true), + ('Escuinapa (Sinaloa MEX)','Escuinapa',-105.736660,22.826020,'MEX','Sinaloa',' MX-SIN ',' Laguna Agua Grande ',27.3,NULL,NULL,'','',true), + ('Guamuchil (Sinaloa MEX)','Guamuchil',-108.084180,25.461440,'MEX','Sinaloa',' MX-SIN ',' Presa Gustavo Daz Ordaz (Bacurato) ',55.3,NULL,NULL,'','',true), + ('Guasave (Sinaloa MEX)','Guasave',-108.429330,25.559830,'MEX','Sinaloa',' MX-SIN ',' Presa Gustavo Daz Ordaz (Bacurato) ',68.7,NULL,NULL,'','',true), + ('La Cruz (Sinaloa MEX)','La Cruz',-106.881470,23.945650,'MEX','Sinaloa',' MX-SIN ',' Rio San Lorenzo ',65.7,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Los Mochis (Sinaloa MEX)','Los Mochis',-108.959200,25.777900,'MEX','Sinaloa',' MX-SIN ',' Fuerte ',83.0,NULL,NULL,'','',true), + ('Mazatlan (Sinaloa MEX)','Mazatlan',-106.406890,23.282770,'MEX','Sinaloa',' MX-SIN ',' Laguna El Caimanero ',45.3,NULL,NULL,'','',true), + ('Rosario (Sinaloa MEX)','Rosario',-105.863420,22.968610,'MEX','Sinaloa',' MX-SIN ',' Laguna El Caimanero ',24.9,NULL,NULL,'','',true), + ('Agua Prieta (Sonora MEX)','Agua Prieta',-109.535470,31.283340,'MEX','Sonora',' MX-SON ',' Rio Agua Prieta ',7.8,NULL,NULL,'','',true), + ('Benjamin Hill (Sonora MEX)','Benjamin Hill',-111.117930,30.144440,'MEX','Sonora',' MX-SON ',' Arroyo el Zangon ',48.8,NULL,NULL,'','',true), + ('Caborca (Sonora MEX)','Caborca',-112.157460,30.709070,'MEX','Sonora',' MX-SON ',' Arroyo Asuncin ',32.1,NULL,NULL,'','',true), + ('Cananea (Sonora MEX)','Cananea',-110.228880,30.968590,'MEX','Sonora',' MX-SON ',' Arroyo llas Gallinas ',33.0,NULL,NULL,'','',true), + ('Ciudad Obregon (Sonora MEX)','Ciudad Obregon',-109.919040,27.474620,'MEX','Sonora',' MX-SON ',' Presa Alvaro Obregon ',55.7,NULL,NULL,'','',true), + ('Empalme (Sonora MEX)','Empalme',-110.768460,27.963070,'MEX','Sonora',' MX-SON ',' Arroyo El Carrizo ',76.1,NULL,NULL,'','',true), + ('Guaymas (Sonora MEX)','Guaymas',-110.902270,27.915390,'MEX','Sonora',' MX-SON ',' Arroyo El Carrizo ',88.1,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Hermosillo (Sonora MEX)','Hermosillo',-110.946110,29.088970,'MEX','Sonora',' MX-SON ',' Presa Abelardo L Rodrguez ',4.9,NULL,NULL,'','',true), + ('Huatabampo (Sonora MEX)','Huatabampo',-109.604350,26.827790,'MEX','Sonora',' MX-SON ',' Presa Adolfo Ruz Cortines ',71.1,NULL,NULL,'','',true), + ('Magdalena (Sonora MEX)','Magdalena',-110.905230,30.650190,'MEX','Sonora',' MX-SON ',' Arroyo Magdalena ',23.0,NULL,NULL,'','',true), + ('Nacozari de Garcia (Sonora MEX)','Nacozari de Garcia',-109.657890,30.295330,'MEX','Sonora',' MX-SON ',' Arroyo Sonora ',48.2,NULL,NULL,'','',true), + ('Navojoa (Sonora MEX)','Navojoa',-109.435260,27.094710,'MEX','Sonora',' MX-SON ',' Presa Adolfo Ruz Cortines ',40.7,NULL,NULL,'','',true), + ('Nogales (Sonora MEX)','Nogales',-110.941360,31.280600,'MEX','Sonora',' MX-SON ',' Santa Cruz River ',48.1,NULL,NULL,'','',true), + ('Puerto Penasco (Sonora MEX)','Puerto Penasco',-113.540390,31.320260,'MEX','Sonora',' MX-SON ',' Arroyo Sonoyta ',71.2,NULL,NULL,'','',true), + ('San Luis Rio Colorado (Sonora MEX)','San Luis Rio Colorado',-114.862900,32.473310,'MEX','Sonora',' MX-SON ',' Hardy ',49.6,NULL,NULL,'','',true), + ('Sonoyta (Sonora MEX)','Sonoyta',-112.883900,31.844510,'MEX','Sonora',' MX-SON ',' Arroyo Sonoyta ',14.7,NULL,NULL,'','',true), + ('Cardenas (Tabasco MEX)','Cardenas',-93.357370,18.011320,'MEX','Tabasco',' MX-TAB ',' Grijalva ',89.3,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Comalcalco (Tabasco MEX)','Comalcalco',-93.235520,18.252510,'MEX','Tabasco',' MX-TAB ',' San Pedro y San Pablo ',98.3,NULL,NULL,'','',true), + ('Emiliano Zapata (Tabasco MEX)','Emiliano Zapata',-91.772920,17.717950,'MEX','Tabasco',' MX-TAB ',' Usumacinta ',16.4,NULL,NULL,'','',true), + ('Frontera (Tabasco MEX)','Frontera',-92.653760,18.510400,'MEX','Tabasco',' MX-TAB ',' San Pedro y San Pablo ',36.3,NULL,NULL,'','',true), + ('Teapa (Tabasco MEX)','Teapa',-92.976880,17.556270,'MEX','Tabasco',' MX-TAB ',' La Sierra ',37.5,NULL,NULL,'','',true), + ('Tenosique (Tabasco MEX)','Tenosique',-91.420550,17.471540,'MEX','Tabasco',' MX-TAB ',' Usumacinta ',30.1,NULL,NULL,'','',true), + ('Villahermosa (Tabasco MEX)','Villahermosa',-92.926430,17.987620,'MEX','Tabasco',' MX-TAB ',' La Sierra ',73.6,NULL,NULL,'','',true), + ('Ciudad Madero (Tamaulipas MEX)','Ciudad Madero',-97.838210,22.290280,'MEX','Tamaulipas',' MX-TAM ',' Laguna de Pueblo Viejo ',17.6,NULL,NULL,'','',true), + ('Ciudad Mante (Tamaulipas MEX)','Ciudad Mante',-98.953370,22.724770,'MEX','Tamaulipas',' MX-TAM ',' Tamesi ',28.6,NULL,NULL,'','',true), + ('Ciudad Victoria (Tamaulipas MEX)','Ciudad Victoria',-99.168900,23.720010,'MEX','Tamaulipas',' MX-TAM ',' Presa Vicente Guerrero ',49.9,NULL,NULL,'','',true), + ('Matamoros (Tamaulipas MEX)','Matamoros',-97.524530,25.833380,'MEX','Tamaulipas',' MX-TAM ',' Laguna El Barril ',32.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Nuevo Laredo (Tamaulipas MEX)','Nuevo Laredo',-99.526760,27.459780,'MEX','Tamaulipas',' MX-TAM ',' San Juan ',73.4,NULL,NULL,'','',true), + ('Reynosa (Tamaulipas MEX)','Reynosa',-98.334240,26.068560,'MEX','Tamaulipas',' MX-TAM ',' Presa Marte R Gomez ',67.3,NULL,NULL,'','',true), + ('Rio Bravo (Tamaulipas MEX)','Rio Bravo',-98.106550,25.980610,'MEX','Tamaulipas',' MX-TAM ',' Presa Marte R Gomez ',91.5,NULL,NULL,'','',true), + ('San Fernando (Tamaulipas MEX)','San Fernando',-98.162260,24.841910,'MEX','Tamaulipas',' MX-TAM ',' Conchos ',76.5,NULL,NULL,'','',true), + ('Valle Hermoso (Tamaulipas MEX)','Valle Hermoso',-97.817160,25.670620,'MEX','Tamaulipas',' MX-TAM ',' Laguna El Barril ',56.7,NULL,NULL,'','',true), + ('Apizaco (Tlaxcala MEX)','Apizaco',-98.155790,19.404150,'MEX','Tlaxcala',' MX-TLA ',' Rio Colorado ',37.1,NULL,NULL,'','',true), + ('Tlaxcala (Tlaxcala MEX)','Tlaxcala',-98.229770,19.328260,'MEX','Tlaxcala',' MX-TLA ',' Presa Manuel vila Camacho ',43.1,NULL,NULL,'','',true), + ('Acayucan (Veracruz-Llave MEX)','Acayucan',-94.939790,17.909000,'MEX','Veracruz-Llave',' MX-VER ',' Coatzacoalcos ',35.8,NULL,NULL,'','',true), + ('Alvarado (Veracruz-Llave MEX)','Alvarado',-95.756550,18.782670,'MEX','Veracruz-Llave',' MX-VER ',' Laguna Mara Lizamba ',25.8,NULL,NULL,'','',true), + ('Cerro Azul (Veracruz-Llave MEX)','Cerro Azul',-97.746210,21.203060,'MEX','Veracruz-Llave',' MX-VER ',' Tuxpam ',51.7,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Coatzacoalcos (Veracruz-Llave MEX)','Coatzacoalcos',-94.420840,18.121310,'MEX','Veracruz-Llave',' MX-VER ',' Coatzacoalcos ',55.8,NULL,NULL,'','',true), + ('Cordoba (Veracruz-Llave MEX)','Cordoba',-96.925990,18.857000,'MEX','Veracruz-Llave',' MX-VER ',' Las Pozas ',25.1,NULL,NULL,'','',true), + ('Cosamaloapan (Veracruz-Llave MEX)','Cosamaloapan',-95.806030,18.347860,'MEX','Veracruz-Llave',' MX-VER ',' Papaloapan ',14.1,NULL,NULL,'','',true), + ('Jesus Carranza (Veracruz-Llave MEX)','Jesus Carranza',-95.046710,17.411090,'MEX','Veracruz-Llave',' MX-VER ',' Santo Domingo ',14.5,NULL,NULL,'','',true), + ('Martinez de la Torre (Veracruz-Llave MEX)','Martinez de la Torre',-97.051030,20.083990,'MEX','Veracruz-Llave',' MX-VER ',' Bobos ',4.9,NULL,NULL,'','',true), + ('Minatitlan (Veracruz-Llave MEX)','Minatitlan',-94.544880,18.007940,'MEX','Veracruz-Llave',' MX-VER ',' Coatzacoalcos ',38.6,NULL,NULL,'','',true), + ('Naranjos (Veracruz-Llave MEX)','Naranjos',-97.681930,21.361570,'MEX','Veracruz-Llave',' MX-VER ',' Tuxpam ',70.5,NULL,NULL,'','',true), + ('Papantla (Veracruz-Llave MEX)','Papantla',-97.326250,20.439280,'MEX','Veracruz-Llave',' MX-VER ',' Cazones ',37.6,NULL,NULL,'','',true), + ('Poza Rica (Veracruz-Llave MEX)','Poza Rica',-97.458320,20.533890,'MEX','Veracruz-Llave',' MX-VER ',' Cazones ',24.2,NULL,NULL,'','',true), + ('San Andres Tuxtla (Veracruz-Llave MEX)','San Andres Tuxtla',-95.226710,18.456270,'MEX','Veracruz-Llave',' MX-VER ',' Lago Catemaco ',17.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Tampico (Veracruz-Llave MEX)','Tampico',-97.862390,22.197390,'MEX','Veracruz-Llave',' MX-VER ',' Laguna de Pueblo Viejo ',7.2,NULL,NULL,'','',true), + ('Tantoyuca (Veracruz-Llave MEX)','Tantoyuca',-98.229900,21.373230,'MEX','Veracruz-Llave',' MX-VER ',' Tempoal ',23.3,NULL,NULL,'','',true), + ('Tierra Blanca (Veracruz-Llave MEX)','Tierra Blanca',-96.351050,18.447280,'MEX','Veracruz-Llave',' MX-VER ',' Presa Miguel Alemajn ',27.3,NULL,NULL,'','',true), + ('Tuxpan (Veracruz-Llave MEX)','Tuxpan',-97.426620,20.968410,'MEX','Veracruz-Llave',' MX-VER ',' Tuxpam ',54.1,NULL,NULL,'','',true), + ('Veracruz (Veracruz-Llave MEX)','Veracruz',-96.119830,19.169800,'MEX','Veracruz-Llave',' MX-VER ',' Jamapa ',56.2,NULL,NULL,'','',true), + ('Xalapa (Veracruz-Llave MEX)','Xalapa',-96.883950,19.548340,'MEX','Veracruz-Llave',' MX-VER ',' Actopan ',9.2,NULL,NULL,'','',true), + ('Hunucma (Yuc MEX)','Hunucma',-89.889780,21.019770,'MEX','Yuc',' MX-YUC ',' Caribe ',318.0,NULL,NULL,'','',true), + ('Merida (Yuc MEX)','Merida',-89.618410,20.972380,'MEX','Yuc',' MX-YUC ',' Rio Hondo ',320.1,NULL,NULL,'','',true), + ('Motul (Yuc MEX)','Motul',-89.298200,21.093820,'MEX','Yuc',' MX-YUC ',' Rio Hondo ',325.0,NULL,NULL,'','',true), + ('Progreso (Yuc MEX)','Progreso',-89.677050,21.256430,'MEX','Yuc',' MX-YUC ',' Caribe ',349.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Tekax (Yuc MEX)','Tekax',-89.296210,20.212850,'MEX','Yuc',' MX-YUC ',' Rio Hondo ',229.6,NULL,NULL,'','',true), + ('Ticul (Yuc MEX)','Ticul',-89.520440,20.390320,'MEX','Yuc',' MX-YUC ',' Rio Hondo ',255.5,NULL,NULL,'','',true), + ('Tizimin (Yuc MEX)','Tizimin',-88.157290,21.141470,'MEX','Yuc',' MX-YUC ',' Rio Hondo ',329.3,NULL,NULL,'','',true), + ('Valladolid (Yuc MEX)','Valladolid',-88.205920,20.736860,'MEX','Yuc',' MX-YUC ',' Rio Hondo ',284.2,NULL,NULL,'','',true), + ('Concepcion del Oro (Zacatecas MEX)','Concepcion del Oro',-101.351510,24.625370,'MEX','Zacatecas',' MX-ZAC ',' Rio San Pedro ',40.9,NULL,NULL,'','',true), + ('Fresnillo (Zacatecas MEX)','Fresnillo',-102.851160,23.169700,'MEX','Zacatecas',' MX-ZAC ',' Aguanaval ',120.1,NULL,NULL,'','',true), + ('Jerez de Garcia Salinas (Zacatecas MEX)','Jerez de Garcia Salinas',-103.006380,22.667500,'MEX','Zacatecas',' MX-ZAC ',' Atengo ',83.4,NULL,NULL,'','',true), + ('Juan Aldama (Zacatecas MEX)','Juan Aldama',-103.363210,24.350000,'MEX','Zacatecas',' MX-ZAC ',' Santa Clara ',10.9,NULL,NULL,'','',true), + ('Rio Grande (Zacatecas MEX)','Rio Grande',-103.037420,23.819980,'MEX','Zacatecas',' MX-ZAC ',' Aguanaval ',45.3,NULL,NULL,'','',true), + ('Sombrerete (Zacatecas MEX)','Sombrerete',-103.601290,23.604850,'MEX','Zacatecas',' MX-ZAC ',' Aguanaval ',82.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Zacatecas (Zacatecas MEX)','Zacatecas',-102.541250,22.751670,'MEX','Zacatecas',' MX-ZAC ',' Rio Juchipila ',121.0,NULL,NULL,'','',true), + ('Andalusia (Alabama USA)','Andalusia',-86.486480,31.275630,'USA','Alabama',' US-AL ',' Conecuh River ',27.3,NULL,NULL,'','',true), + ('Anniston (Alabama USA)','Anniston',-85.826510,33.666840,'USA','Alabama',' US-AL ',' Logan Martin Lake ',42.3,NULL,NULL,'','',true), + ('Atmore (Alabama USA)','Atmore',-87.476650,31.029440,'USA','Alabama',' US-AL ',' Escambia River ',31.1,NULL,NULL,'','',true), + ('Auburn (Alabama USA)','Auburn',-85.572780,32.599630,'USA','Alabama',' US-AL ',' Martin Lake ',39.8,NULL,NULL,'','',true), + ('Birmingham (Alabama USA)','Birmingham',-86.813300,33.531690,'USA','Alabama',' US-AL ',' Locust Fork ',35.9,NULL,NULL,'','',true), + ('Decatur (Alabama USA)','Decatur',-87.008010,34.595220,'USA','Alabama',' US-AL ',' Wheeler Lake ',28.1,NULL,NULL,'','',true), + ('Dothan (Alabama USA)','Dothan',-85.392600,31.241830,'USA','Alabama',' US-AL ',' East Fork Choctawhatchee River ',25.4,NULL,NULL,'','',true), + ('Florence (Alabama USA)','Florence',-87.654030,34.872400,'USA','Alabama',' US-AL ',' Wheeler Lake ',38.8,NULL,NULL,'','',true), + ('Gadsden (Alabama USA)','Gadsden',-85.974300,33.994330,'USA','Alabama',' US-AL ',' Slab Creek ',40.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Greenville (Alabama USA)','Greenville',-86.592230,31.782470,'USA','Alabama',' US-AL ',' Conecuh River ',35.0,NULL,NULL,'','',true), + ('Huntsville (Alabama USA)','Huntsville',-86.617580,34.696040,'USA','Alabama',' US-AL ',' Guntersville Lake ',50.1,NULL,NULL,'','',true), + ('Jasper (Alabama USA)','Jasper',-87.293720,33.828960,'USA','Alabama',' US-AL ',' Sipsey Fork ',20.2,NULL,NULL,'','',true), + ('Mobile (Alabama USA)','Mobile',-88.095260,30.719270,'USA','Alabama',' US-AL ',' Pascagoula River ',54.1,NULL,NULL,'','',true), + ('Montgomery (Alabama USA)','Montgomery',-86.270780,32.374600,'USA','Alabama',' US-AL ',' Alabama ',53.2,NULL,NULL,'','',true), + ('Selma (Alabama USA)','Selma',-87.030660,32.417210,'USA','Alabama',' US-AL ',' Alabama ',34.8,NULL,NULL,'','',true), + ('Troy (Alabama USA)','Troy',-85.995330,31.809350,'USA','Alabama',' US-AL ',' Pea River ',38.2,NULL,NULL,'','',true), + ('Tuscaloosa (Alabama USA)','Tuscaloosa',-87.569910,33.207660,'USA','Alabama',' US-AL ',' Black Warrior River ',25.7,NULL,NULL,'','',true), + ('Akutan (Alaska USA)','Akutan',-165.770040,54.143220,'USA','Alaska',' US-AK ',' Sandy River ',433.8,NULL,NULL,'','',true), + ('Alakanuk (Alaska USA)','Alakanuk',-164.664360,62.730090,'USA','Alaska',' US-AK ',' Kwikpak Pass ',33.1,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Anchorage (Alaska USA)','Anchorage',-149.799580,61.229460,'USA','Alaska',' US-AK ',' Beluga River ',74.7,NULL,NULL,'','',true), + ('Angoon (Alaska USA)','Angoon',-134.527480,57.504680,'USA','Alaska',' US-AK ',' Whiting River ',108.5,NULL,NULL,'','',true), + ('Arctic Village (Alaska USA)','Arctic Village',-145.732430,68.039890,'USA','Alaska',' US-AK ',' East Fork Chandalar River ',1.9,NULL,NULL,'','',true), + ('Barrow (Alaska USA)','Barrow',-156.611740,71.330410,'USA','Alaska',' US-AK ',' Meade ',127.0,NULL,NULL,'','',true), + ('Bethel (Alaska USA)','Bethel',-161.777560,60.796090,'USA','Alaska',' US-AK ',' Kwethluk River ',56.3,NULL,NULL,'','',true), + ('Chignik (Alaska USA)','Chignik',-158.454660,56.317230,'USA','Alaska',' US-AK ',' Chignik Lake ',23.2,NULL,NULL,'','',true), + ('Circle (Alaska USA)','Circle',-144.042930,65.820850,'USA','Alaska',' US-AK ',' Birch Creek ',43.5,NULL,NULL,'','',true), + ('Cold Bay (Alaska USA)','Cold Bay',-162.749480,55.215530,'USA','Alaska',' US-AK ',' Sandy River ',206.0,NULL,NULL,'','',true), + ('Cordova (Alaska USA)','Cordova',-145.687300,60.552140,'USA','Alaska',' US-AK ',' Berg Lakes ',104.7,NULL,NULL,'','',true), + ('Delta Junction (Alaska USA)','Delta Junction',-145.680810,64.042940,'USA','Alaska',' US-AK ',' Tanana ',26.5,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Dillingham (Alaska USA)','Dillingham',-158.561090,59.044070,'USA','Alaska',' US-AK ',' Kokwok River ',63.2,NULL,NULL,'','',true), + ('Emmonak (Alaska USA)','Emmonak',-164.349090,62.764310,'USA','Alaska',' US-AK ',' Kwikpak Pass ',16.6,NULL,NULL,'','',true), + ('Fairbanks (Alaska USA)','Fairbanks',-147.713500,64.823120,'USA','Alaska',' US-AK ',' Chatanika River ',35.6,NULL,NULL,'','',true), + ('False Pass (Alaska USA)','False Pass',-163.418370,54.818080,'USA','Alaska',' US-AK ',' Sandy River ',266.1,NULL,NULL,'','',true), + ('Fort Yukon (Alaska USA)','Fort Yukon',-145.205910,66.575770,'USA','Alaska',' US-AK ',' Preacher Creek ',70.2,NULL,NULL,'','',true), + ('Galena (Alaska USA)','Galena',-156.869770,64.771430,'USA','Alaska',' US-AK ',' Kateel River ',99.0,NULL,NULL,'','',true), + ('Glennallen (Alaska USA)','Glennallen',-145.535510,62.106970,'USA','Alaska',' US-AK ',' Tazlina River ',15.9,NULL,NULL,'','',true), + ('Haines (Alaska USA)','Haines',-135.453330,59.276940,'USA','Alaska',' US-AK ',' Chilkat River ',32.8,NULL,NULL,'','',true), + ('Holy Cross (Alaska USA)','Holy Cross',-159.791960,62.195770,'USA','Alaska',' US-AK ',' Kukaklik Lake ',71.9,NULL,NULL,'','',true), + ('Homer (Alaska USA)','Homer',-151.569710,59.672980,'USA','Alaska',' US-AK ',' Chakachatna River ',163.1,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Hoonah (Alaska USA)','Hoonah',-135.407200,58.105020,'USA','Alaska',' US-AK ',' Taku River ',114.9,NULL,NULL,'','',true), + ('Hooper Bay (Alaska USA)','Hooper Bay',-166.120610,61.527440,'USA','Alaska',' US-AK ',' Kashunuk River ',39.3,NULL,NULL,'','',true), + ('Juneau (Alaska USA)','Juneau',-134.428990,58.363850,'USA','Alaska',' US-AK ',' Taku River ',50.9,NULL,NULL,'','',true), + ('Kenai (Alaska USA)','Kenai',-151.240650,60.572940,'USA','Alaska',' US-AK ',' Chakachatna River ',72.3,NULL,NULL,'','',true), + ('Ketchikan (Alaska USA)','Ketchikan',-131.688180,55.386440,'USA','Alaska',' US-AK ',' Georgie River ',105.5,NULL,NULL,'','',true), + ('King Salmon (Alaska USA)','King Salmon',-156.655950,58.730360,'USA','Alaska',' US-AK ',' Naknek River ',4.2,NULL,NULL,'','',true), + ('Kodiak (Alaska USA)','Kodiak',-152.363470,57.807990,'USA','Alaska',' US-AK ',' Angle Creek ',204.3,NULL,NULL,'','',true), + ('Kotzebue (Alaska USA)','Kotzebue',-162.467550,66.877560,'USA','Alaska',' US-AK ',' Emanvicrok Channel ',54.7,NULL,NULL,'','',true), + ('McGrath (Alaska USA)','McGrath',-155.535520,62.943460,'USA','Alaska',' US-AK ',' East Fork Kuskokwim River ',74.9,NULL,NULL,'','',true), + ('Mountain Village (Alaska USA)','Mountain Village',-163.750920,62.124630,'USA','Alaska',' US-AK ',' Chuilnuk River ',60.7,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Naknek (Alaska USA)','Naknek',-156.923700,58.775280,'USA','Alaska',' US-AK ',' Naknek River ',16.9,NULL,NULL,'','',true), + ('Nenana (Alaska USA)','Nenana',-149.033830,64.539630,'USA','Alaska',' US-AK ',' Teklanika River ',41.1,NULL,NULL,'','',true), + ('Nikiski (Alaska USA)','Nikiski',-151.334790,60.733170,'USA','Alaska',' US-AK ',' Chakachatna River ',54.6,NULL,NULL,'','',true), + ('Noatak (Alaska USA)','Noatak',-163.103580,67.348430,'USA','Alaska',' US-AK ',' Krusenstern Lagoon ',29.7,NULL,NULL,'','',true), + ('Nome (Alaska USA)','Nome',-165.531910,64.556080,'USA','Alaska',' US-AK ',' Tuksuk Channel ',75.7,NULL,NULL,'','',true), + ('Palmer (Alaska USA)','Palmer',-149.094610,61.603260,'USA','Alaska',' US-AK ',' Matanuska River ',25.6,NULL,NULL,'','',true), + ('Petersburg (Alaska USA)','Petersburg',-132.879090,56.767180,'USA','Alaska',' US-AK ',' Stikine River ',64.1,NULL,NULL,'','',true), + ('Point Hope (Alaska USA)','Point Hope',-166.645290,68.351680,'USA','Alaska',' US-AK ',' Kukpuk River ',50.2,NULL,NULL,'','',true), + ('Prudhoe Bay (Alaska USA)','Prudhoe Bay',-148.371190,70.287010,'USA','Alaska',' US-AK ',' Kuparuk River ',57.4,NULL,NULL,'','',true), + ('Sand Point (Alaska USA)','Sand Point',-160.461130,55.346470,'USA','Alaska',' US-AK ',' Sandy River ',97.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Selawik (Alaska USA)','Selawik',-160.262550,66.651520,'USA','Alaska',' US-AK ',' Nazuruk Channel ',39.2,NULL,NULL,'','',true), + ('Seldovia (Alaska USA)','Seldovia',-151.717070,59.434500,'USA','Alaska',' US-AK ',' Lake Clark ',169.8,NULL,NULL,'','',true), + ('Seward (Alaska USA)','Seward',-149.449020,60.119390,'USA','Alaska',' US-AK ',' Beluga River ',161.1,NULL,NULL,'','',true), + ('Sitka (Alaska USA)','Sitka',-135.317440,57.077190,'USA','Alaska',' US-AK ',' Whiting River ',175.7,NULL,NULL,'','',true), + ('Skagway (Alaska USA)','Skagway',-135.387340,59.489830,'USA','Alaska',' US-AK ',' Skagway River ',20.9,NULL,NULL,'','',true), + ('Sleetmute (Alaska USA)','Sleetmute',-157.078620,61.731850,'USA','Alaska',' US-AK ',' Kuskokwim ',51.8,NULL,NULL,'','',true), + ('Soldotna (Alaska USA)','Soldotna',-150.997370,60.438370,'USA','Alaska',' US-AK ',' Chakachatna River ',92.1,NULL,NULL,'','',true), + ('Tanana (Alaska USA)','Tanana',-152.094760,65.214150,'USA','Alaska',' US-AK ',' Melozitna River ',116.4,NULL,NULL,'','',true), + ('Togiak (Alaska USA)','Togiak',-160.409430,59.081060,'USA','Alaska',' US-AK ',' Togiak River ',50.6,NULL,NULL,'','',true), + ('Tok (Alaska USA)','Tok',-143.025880,63.306660,'USA','Alaska',' US-AK ',' Tetlin Lake ',26.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Unalakleet (Alaska USA)','Unalakleet',-160.718960,63.935370,'USA','Alaska',' US-AK ',' Unalakleet River ',22.4,NULL,NULL,'','',true), + ('Unalaska (Alaska USA)','Unalaska',-166.447470,53.875650,'USA','Alaska',' US-AK ',' Sandy River ',487.1,NULL,NULL,'','',true), + ('Valdez (Alaska USA)','Valdez',-146.352710,61.167700,'USA','Alaska',' US-AK ',' Klutina Lake ',63.3,NULL,NULL,'','',true), + ('Wainwright (Alaska USA)','Wainwright',-159.925120,70.646560,'USA','Alaska',' US-AK ',' Kuk River ',54.4,NULL,NULL,'','',true), + ('Wasilla (Alaska USA)','Wasilla',-149.467340,61.583050,'USA','Alaska',' US-AK ',' Matanuska River ',44.8,NULL,NULL,'','',true), + ('Whittier (Alaska USA)','Whittier',-148.745560,60.796360,'USA','Alaska',' US-AK ',' Matanuska River ',101.2,NULL,NULL,'','',true), + ('Wrangell (Alaska USA)','Wrangell',-132.327380,56.449650,'USA','Alaska',' US-AK ',' Stikine River ',37.5,NULL,NULL,'','',true), + ('Yakutat (Alaska USA)','Yakutat',-139.596980,59.554150,'USA','Alaska',' US-AK ',' Harlequin Lake ',39.0,NULL,NULL,'','',true), + ('Ajo (Arizona USA)','Ajo',-112.819120,32.388350,'USA','Arizona',' US-AZ ',' San Cristobol Wash ',50.6,NULL,NULL,'','',true), + ('Bullhead City (Arizona USA)','Bullhead City',-114.546660,35.115110,'USA','Arizona',' US-AZ ',' Lake Mohave ',41.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Casa Grande (Arizona USA)','Casa Grande',-111.777700,32.912470,'USA','Arizona',' US-AZ ',' Gila ',52.8,NULL,NULL,'','',true), + ('Douglas (Arizona USA)','Douglas',-109.578940,31.380770,'USA','Arizona',' US-AZ ',' Rio Agua Prieta ',19.3,NULL,NULL,'','',true), + ('Eloy (Arizona USA)','Eloy',-111.498330,32.759220,'USA','Arizona',' US-AZ ',' Gila ',38.6,NULL,NULL,'','',true), + ('Flagstaff (Arizona USA)','Flagstaff',-111.635260,35.222420,'USA','Arizona',' US-AZ ',' Verde River ',90.0,NULL,NULL,'','',true), + ('Gila Bend (Arizona USA)','Gila Bend',-112.679490,32.982450,'USA','Arizona',' US-AZ ',' San Cristobol Wash ',92.0,NULL,NULL,'','',true), + ('Globe (Arizona USA)','Globe',-110.765700,33.388430,'USA','Arizona',' US-AZ ',' San Carlos Reservoir ',40.5,NULL,NULL,'','',true), + ('Holbrook (Arizona USA)','Holbrook',-110.160540,34.911260,'USA','Arizona',' US-AZ ',' Little Colorado River ',44.7,NULL,NULL,'','',true), + ('Kingman (Arizona USA)','Kingman',-114.045220,35.198130,'USA','Arizona',' US-AZ ',' Trout Creek ',59.6,NULL,NULL,'','',true), + ('Lake Havasu City (Arizona USA)','Lake Havasu City',-114.302640,34.490600,'USA','Arizona',' US-AZ ',' Lake Havasu ',6.5,NULL,NULL,'','',true), + ('Mesa (Arizona USA)','Mesa',-111.828970,33.428470,'USA','Arizona',' US-AZ ',' Gila ',72.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Page (Arizona USA)','Page',-111.476180,36.866140,'USA','Arizona',' US-AZ ',' Lake Powell ',75.2,NULL,NULL,'','',true), + ('Payson (Arizona USA)','Payson',-111.307260,34.226080,'USA','Arizona',' US-AZ ',' Theodore Roosevelt Lake ',60.4,NULL,NULL,'','',true), + ('Phoenix (Arizona USA)','Phoenix',-112.080530,33.498350,'USA','Arizona',' US-AZ ',' Hassayampa River ',73.7,NULL,NULL,'','',true), + ('Prescott (Arizona USA)','Prescott',-112.458280,34.528680,'USA','Arizona',' US-AZ ',' Verde River ',50.5,NULL,NULL,'','',true), + ('Safford (Arizona USA)','Safford',-109.737920,32.824750,'USA','Arizona',' US-AZ ',' San Simon Creek ',54.6,NULL,NULL,'','',true), + ('Sedona (Arizona USA)','Sedona',-111.799950,34.903220,'USA','Arizona',' US-AZ ',' Verde River ',51.8,NULL,NULL,'','',true), + ('Show Low (Arizona USA)','Show Low',-110.021360,34.260260,'USA','Arizona',' US-AZ ',' Little Colorado River ',111.0,NULL,NULL,'','',true), + ('Sierra Vista (Arizona USA)','Sierra Vista',-110.305280,31.549320,'USA','Arizona',' US-AZ ',' Santa Cruz River ',61.2,NULL,NULL,'','',true), + ('Tucson (Arizona USA)','Tucson',-110.978480,32.302450,'USA','Arizona',' US-AZ ',' San Pedro River ',58.1,NULL,NULL,'','',true), + ('Wickenburg (Arizona USA)','Wickenburg',-112.705300,33.969700,'USA','Arizona',' US-AZ ',' Hassayampa River ',5.2,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Willcox (Arizona USA)','Willcox',-109.792510,32.268500,'USA','Arizona',' US-AZ ',' San Simon Creek ',45.4,NULL,NULL,'','',true), + ('Williams (Arizona USA)','Williams',-112.122000,35.231310,'USA','Arizona',' US-AZ ',' Verde River ',89.2,NULL,NULL,'','',true), + ('Yuma (Arizona USA)','Yuma',-114.624970,32.690630,'USA','Arizona',' US-AZ ',' Hardy ',82.2,NULL,NULL,'','',true), + ('Arkadelphia (Arkansas USA)','Arkadelphia',-93.045120,34.178280,'USA','Arkansas',' US-AR ',' De Gray Reservoir ',21.0,NULL,NULL,'','',true), + ('Batesville (Arkansas USA)','Batesville',-91.654740,35.778170,'USA','Arkansas',' US-AR ',' Greers Ferry Lake ',53.5,NULL,NULL,'','',true), + ('Camden (Arkansas USA)','Camden',-92.847280,33.551760,'USA','Arkansas',' US-AR ',' Ouachita River ',47.4,NULL,NULL,'','',true), + ('Conway (Arkansas USA)','Conway',-92.433080,35.077590,'USA','Arkansas',' US-AR ',' Greers Ferry Lake ',58.1,NULL,NULL,'','',true), + ('El Dorado (Arkansas USA)','El Dorado',-92.658880,33.208570,'USA','Arkansas',' US-AR ',' Ouachita River ',11.7,NULL,NULL,'','',true), + ('Fayetteville (Arkansas USA)','Fayetteville',-94.161540,36.071210,'USA','Arkansas',' US-AR ',' Beaver Lake ',33.9,NULL,NULL,'','',true), + ('Fort Smith (Arkansas USA)','Fort Smith',-94.410860,35.380400,'USA','Arkansas',' US-AR ',' Ozark Lake ',40.6,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Hope (Arkansas USA)','Hope',-93.582190,33.647080,'USA','Arkansas',' US-AR ',' Millwood Lake ',38.4,NULL,NULL,'','',true), + ('Hot Springs (Arkansas USA)','Hot Springs',-93.054420,34.513090,'USA','Arkansas',' US-AR ',' Lake Hamilton ',7.4,NULL,NULL,'','',true), + ('Jonesboro (Arkansas USA)','Jonesboro',-90.694230,35.856620,'USA','Arkansas',' US-AR ',' Cache River ',33.5,NULL,NULL,'','',true), + ('Little Rock (Arkansas USA)','Little Rock',-92.296230,34.743120,'USA','Arkansas',' US-AR ',' Lake Hamilton ',81.1,NULL,NULL,'','',true), + ('Magnolia (Arkansas USA)','Magnolia',-93.245360,33.261830,'USA','Arkansas',' US-AR ',' Ouachita River ',66.4,NULL,NULL,'','',true), + ('Pine Bluff (Arkansas USA)','Pine Bluff',-92.022820,34.221080,'USA','Arkansas',' US-AR ',' Lake Hamilton ',104.9,NULL,NULL,'','',true), + ('Searcy (Arkansas USA)','Searcy',-91.987670,35.099230,'USA','Arkansas',' US-AR ',' Greers Ferry Lake ',54.0,NULL,NULL,'','',true), + ('Stuttgart (Arkansas USA)','Stuttgart',-91.543050,34.492630,'USA','Arkansas',' US-AR ',' Greers Ferry Lake ',132.0,NULL,NULL,'','',true), + ('Alturas (California USA)','Alturas',-120.530410,41.456970,'USA','California',' US-CA ',' Goose Lake ',52.1,NULL,NULL,'','',true), + ('Anaheim (California USA)','Anaheim',-117.818630,33.850970,'USA','California',' US-CA ',' Salton Sea ',195.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Bakersfield (California USA)','Bakersfield',-118.990960,35.367890,'USA','California',' US-CA ',' Isabella Lake ',63.3,NULL,NULL,'','',true), + ('Barstow (California USA)','Barstow',-117.033070,34.924630,'USA','California',' US-CA ',' Isabella Lake ',149.8,NULL,NULL,'','',true), + ('Berkeley (California USA)','Berkeley',-122.253010,37.903030,'USA','California',' US-CA ',' Lake Berryessa ',76.3,NULL,NULL,'','',true), + ('Bishop (California USA)','Bishop',-118.430970,37.336750,'USA','California',' US-CA ',' Owens River ',12.9,NULL,NULL,'','',true), + ('Blythe (California USA)','Blythe',-114.623380,33.644640,'USA','California',' US-CA ',' Lake Havasu ',93.5,NULL,NULL,'','',true), + ('Chico (California USA)','Chico',-121.864570,39.719730,'USA','California',' US-CA ',' Sacramento ',11.6,NULL,NULL,'','',true), + ('Concord (California USA)','Concord',-122.003100,37.967930,'USA','California',' US-CA ',' Lake Berryessa ',71.1,NULL,NULL,'','',true), + ('Crescent City (California USA)','Crescent City',-124.120790,41.769410,'USA','California',' US-CA ',' Klamath ',91.4,NULL,NULL,'','',true), + ('Delano (California USA)','Delano',-119.203770,35.783450,'USA','California',' US-CA ',' Kern River ',61.2,NULL,NULL,'','',true), + ('El Centro (California USA)','El Centro',-115.561180,32.830820,'USA','California',' US-CA ',' Laguna Salada ',45.2,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Escondido (California USA)','Escondido',-117.028560,33.106630,'USA','California',' US-CA ',' Arroyo sin Nombre ',99.7,NULL,NULL,'','',true), + ('Eureka (California USA)','Eureka',-124.145510,40.773560,'USA','California',' US-CA ',' Trinity ',77.8,NULL,NULL,'','',true), + ('Fremont (California USA)','Fremont',-122.004850,37.585560,'USA','California',' US-CA ',' Mokelumne River ',97.2,NULL,NULL,'','',true), + ('Fresno (California USA)','Fresno',-119.779440,36.778100,'USA','California',' US-CA ',' Millerton Lake ',30.8,NULL,NULL,'','',true), + ('Glendale (California USA)','Glendale',-118.237500,34.130500,'USA','California',' US-CA ',' Isabella Lake ',172.5,NULL,NULL,'','',true), + ('Hanford (California USA)','Hanford',-119.652860,36.328400,'USA','California',' US-CA ',' Fresno Slough ',45.9,NULL,NULL,'','',true), + ('Lancaster (California USA)','Lancaster',-118.134420,34.676250,'USA','California',' US-CA ',' Isabella Lake ',113.8,NULL,NULL,'','',true), + ('Lompoc (California USA)','Lompoc',-120.420160,34.632870,'USA','California',' US-CA ',' Salinas ',156.2,NULL,NULL,'','',true), + ('Long Beach (California USA)','Long Beach',-118.142430,33.794260,'USA','California',' US-CA ',' Isabella Lake ',210.6,NULL,NULL,'','',true), + ('Los Angeles (California USA)','Los Angeles',-118.315470,33.984160,'USA','California',' US-CA ',' Isabella Lake ',188.3,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Merced (California USA)','Merced',-120.440960,37.310070,'USA','California',' US-CA ',' San Joaquin ',27.3,NULL,NULL,'','',true), + ('Modesto (California USA)','Modesto',-120.985130,37.645210,'USA','California',' US-CA ',' Stanislaus ',56.1,NULL,NULL,'','',true), + ('Monterey (California USA)','Monterey',-121.901830,36.585890,'USA','California',' US-CA ',' San Luis Reservoir ',86.8,NULL,NULL,'','',true), + ('Napa (California USA)','Napa',-122.264030,38.313080,'USA','California',' US-CA ',' Lake Berryessa ',31.1,NULL,NULL,'','',true), + ('Needles (California USA)','Needles',-114.665170,34.777940,'USA','California',' US-CA ',' Lake Havasu ',52.0,NULL,NULL,'','',true), + ('Oakland (California USA)','Oakland',-122.185110,37.809440,'USA','California',' US-CA ',' Lake Berryessa ',86.6,NULL,NULL,'','',true), + ('Oceanside (California USA)','Oceanside',-117.339150,33.193140,'USA','California',' US-CA ',' Arroyo sin Nombre ',125.3,NULL,NULL,'','',true), + ('Ontario (California USA)','Ontario',-117.722070,34.037180,'USA','California',' US-CA ',' Isabella Lake ',192.5,NULL,NULL,'','',true), + ('Oxnard (California USA)','Oxnard',-119.149880,34.202880,'USA','California',' US-CA ',' Isabella Lake ',177.4,NULL,NULL,'','',true), + ('Palm Springs (California USA)','Palm Springs',-116.535330,33.778480,'USA','California',' US-CA ',' Salton Sea ',84.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Paradise (California USA)','Paradise',-121.645820,39.706220,'USA','California',' US-CA ',' Lake Oroville ',20.9,NULL,NULL,'','',true), + ('Pasadena (California USA)','Pasadena',-117.931920,34.098590,'USA','California',' US-CA ',' Isabella Lake ',180.6,NULL,NULL,'','',true), + ('Porterville (California USA)','Porterville',-119.002810,36.032740,'USA','California',' US-CA ',' Kern River ',42.4,NULL,NULL,'','',true), + ('Red Bluff (California USA)','Red Bluff',-122.269240,40.184700,'USA','California',' US-CA ',' Sacramento ',58.9,NULL,NULL,'','',true), + ('Redding (California USA)','Redding',-122.418430,40.585240,'USA','California',' US-CA ',' Shasta Lake ',24.8,NULL,NULL,'','',true), + ('Ridgecrest (California USA)','Ridgecrest',-117.645560,35.622260,'USA','California',' US-CA ',' Isabella Lake ',68.7,NULL,NULL,'','',true), + ('Riverside (California USA)','Riverside',-117.433730,33.954470,'USA','California',' US-CA ',' Salton Sea ',166.0,NULL,NULL,'','',true), + ('Sacramento (California USA)','Sacramento',-121.462620,38.584840,'USA','California',' US-CA ',' American River ',13.2,NULL,NULL,'','',true), + ('Salinas (California USA)','Salinas',-121.642500,36.694610,'USA','California',' US-CA ',' San Luis Reservoir ',61.2,NULL,NULL,'','',true), + ('San Bernardino (California USA)','San Bernardino',-117.250660,34.109050,'USA','California',' US-CA ',' Salton Sea ',159.6,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('San Diego (California USA)','San Diego',-117.113490,32.700650,'USA','California',' US-CA ',' Arroyo sin Nombre ',74.1,NULL,NULL,'','',true), + ('San Francisco (California USA)','San Francisco',-122.437240,37.733440,'USA','California',' US-CA ',' Lake Berryessa ',97.3,NULL,NULL,'','',true), + ('San Jose (California USA)','San Jose',-121.878060,37.322760,'USA','California',' US-CA ',' San Luis Reservoir ',72.9,NULL,NULL,'','',true), + ('San Luis Obispo (California USA)','San Luis Obispo',-120.621990,35.263270,'USA','California',' US-CA ',' Salinas ',84.0,NULL,NULL,'','',true), + ('Santa Ana (California USA)','Santa Ana',-117.766890,33.730480,'USA','California',' US-CA ',' Salton Sea ',186.9,NULL,NULL,'','',true), + ('Santa Barbara (California USA)','Santa Barbara',-119.712020,34.468910,'USA','California',' US-CA ',' Isabella Lake ',179.4,NULL,NULL,'','',true), + ('Santa Cruz (California USA)','Santa Cruz',-122.046260,36.969430,'USA','California',' US-CA ',' San Luis Reservoir ',82.3,NULL,NULL,'','',true), + ('Santa Maria (California USA)','Santa Maria',-120.396340,34.948680,'USA','California',' US-CA ',' Salinas ',124.2,NULL,NULL,'','',true), + ('Santa Rosa (California USA)','Santa Rosa',-122.743470,38.456780,'USA','California',' US-CA ',' Lake Berryessa ',49.3,NULL,NULL,'','',true), + ('South Lake Tahoe (California USA)','South Lake Tahoe',-119.946730,38.916160,'USA','California',' US-CA ',' Lake Tahoe ',22.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Stockton (California USA)','Stockton',-121.277240,37.932470,'USA','California',' US-CA ',' Mokelumne River ',31.8,NULL,NULL,'','',true), + ('Sunnyvale (California USA)','Sunnyvale',-122.132470,37.369560,'USA','California',' US-CA ',' San Luis Reservoir ',95.7,NULL,NULL,'','',true), + ('Susanville (California USA)','Susanville',-120.668420,40.410340,'USA','California',' US-CA ',' Honey Lake ',35.8,NULL,NULL,'','',true), + ('Ukiah (California USA)','Ukiah',-123.277220,39.125120,'USA','California',' US-CA ',' Russian River ',34.2,NULL,NULL,'','',true), + ('Visalia (California USA)','Visalia',-119.319880,36.351000,'USA','California',' US-CA ',' Kings River ',53.0,NULL,NULL,'','',true), + ('Weed (California USA)','Weed',-122.380120,41.439890,'USA','California',' US-CA ',' Trinity Lake ',62.6,NULL,NULL,'','',true), + ('Yreka (California USA)','Yreka',-122.683700,41.742500,'USA','California',' US-CA ',' Klamath ',28.0,NULL,NULL,'','',true), + ('Yuba City (California USA)','Yuba City',-121.645600,39.136480,'USA','California',' US-CA ',' North Yuba River ',38.5,NULL,NULL,'','',true), + ('Alamosa (Colorado USA)','Alamosa',-105.854070,37.465890,'USA','Colorado',' US-CO ',' North Fork Purgatoire River ',77.5,NULL,NULL,'','',true), + ('Aspen (Colorado USA)','Aspen',-106.644230,39.161420,'USA','Colorado',' US-CO ',' Taylor River ',38.2,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Boulder (Colorado USA)','Boulder',-105.230720,40.024740,'USA','Colorado',' US-CO ',' Lake Granby ',54.2,NULL,NULL,'','',true), + ('Burlington (Colorado USA)','Burlington',-102.291500,39.312240,'USA','Colorado',' US-CO ',' South Fork Republican River ',35.4,NULL,NULL,'','',true), + ('Colorado Springs (Colorado USA)','Colorado Springs',-104.767840,38.841280,'USA','Colorado',' US-CO ',' Taylor River ',167.4,NULL,NULL,'','',true), + ('Cortez (Colorado USA)','Cortez',-108.560650,37.348160,'USA','Colorado',' US-CO ',' Animas River ',60.9,NULL,NULL,'','',true), + ('Craig (Colorado USA)','Craig',-107.524670,40.547830,'USA','Colorado',' US-CO ',' Yampa River ',35.2,NULL,NULL,'','',true), + ('Denver (Colorado USA)','Denver',-104.939730,39.755000,'USA','Colorado',' US-CO ',' Lake Granby ',89.5,NULL,NULL,'','',true), + ('Durango (Colorado USA)','Durango',-107.899290,37.275410,'USA','Colorado',' US-CO ',' Animas River ',10.1,NULL,NULL,'','',true), + ('Fort Collins (Colorado USA)','Fort Collins',-105.085400,40.609860,'USA','Colorado',' US-CO ',' Lake Granby ',80.0,NULL,NULL,'','',true), + ('Fort Morgan (Colorado USA)','Fort Morgan',-103.814150,40.262520,'USA','Colorado',' US-CO ',' South Platte ',9.3,NULL,NULL,'','',true), + ('Glenwood Springs (Colorado USA)','Glenwood Springs',-107.036230,39.600210,'USA','Colorado',' US-CO ',' Taylor River ',91.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Grand Junction (Colorado USA)','Grand Junction',-108.519500,39.072990,'USA','Colorado',' US-CO ',' Gunnison River ',67.2,NULL,NULL,'','',true), + ('Greeley (Colorado USA)','Greeley',-104.696460,40.451190,'USA','Colorado',' US-CO ',' South Platte ',71.6,NULL,NULL,'','',true), + ('Gunnison (Colorado USA)','Gunnison',-106.874980,38.542750,'USA','Colorado',' US-CO ',' Blue Mesa Reservoir ',26.9,NULL,NULL,'','',true), + ('La Junta (Colorado USA)','La Junta',-103.532880,37.917450,'USA','Colorado',' US-CO ',' Purgatoire River ',70.9,NULL,NULL,'','',true), + ('Lamar (Colorado USA)','Lamar',-102.617820,38.117720,'USA','Colorado',' US-CO ',' Purgatoire River ',145.6,NULL,NULL,'','',true), + ('Leadville (Colorado USA)','Leadville',-106.266970,39.221760,'USA','Colorado',' US-CO ',' Taylor River ',58.2,NULL,NULL,'','',true), + ('Limon (Colorado USA)','Limon',-103.696370,39.251170,'USA','Colorado',' US-CO ',' South Fork Republican River ',93.5,NULL,NULL,'','',true), + ('Longmont (Colorado USA)','Longmont',-105.097410,40.193280,'USA','Colorado',' US-CO ',' Lake Granby ',62.8,NULL,NULL,'','',true), + ('Montrose (Colorado USA)','Montrose',-107.868600,38.487790,'USA','Colorado',' US-CO ',' Gunnison River ',23.7,NULL,NULL,'','',true), + ('Pagosa Springs (Colorado USA)','Pagosa Springs',-107.071480,37.263440,'USA','Colorado',' US-CO ',' Navajo Reservoir ',52.3,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Pueblo (Colorado USA)','Pueblo',-104.636650,38.249800,'USA','Colorado',' US-CO ',' Purgatoire River ',109.5,NULL,NULL,'','',true), + ('Salida (Colorado USA)','Salida',-105.873530,38.452670,'USA','Colorado',' US-CO ',' Taylor River ',82.7,NULL,NULL,'','',true), + ('Steamboat Springs (Colorado USA)','Steamboat Springs',-106.819970,40.529200,'USA','Colorado',' US-CO ',' Lake Granby ',92.2,NULL,NULL,'','',true), + ('Sterling (Colorado USA)','Sterling',-103.224840,40.677920,'USA','Colorado',' US-CO ',' Lodgepole Creek ',70.1,NULL,NULL,'','',true), + ('Trinidad (Colorado USA)','Trinidad',-104.473790,37.135840,'USA','Colorado',' US-CO ',' Canadian River ',48.1,NULL,NULL,'','',true), + ('Vail (Colorado USA)','Vail',-106.354360,39.617770,'USA','Colorado',' US-CO ',' Lake Granby ',76.0,NULL,NULL,'','',true), + ('Walsenburg (Colorado USA)','Walsenburg',-104.814090,37.611360,'USA','Colorado',' US-CO ',' North Fork Purgatoire River ',45.8,NULL,NULL,'','',true), + ('Bridgeport (Connecticut USA)','Bridgeport',-73.191900,41.196610,'USA','Connecticut',' US-CT ',' Housatonic River ',82.5,NULL,NULL,'','',true), + ('Hartford (Connecticut USA)','Hartford',-72.704870,41.769600,'USA','Connecticut',' US-CT ',' Chicopee River ',49.7,NULL,NULL,'','',true), + ('New Haven (Connecticut USA)','New Haven',-72.898320,41.342280,'USA','Connecticut',' US-CT ',' Housatonic River ',74.5,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('New London (Connecticut USA)','New London',-72.099270,41.341260,'USA','Connecticut',' US-CT ',' Pawcatuck River ',26.6,NULL,NULL,'','',true), + ('Waterbury (Connecticut USA)','Waterbury',-73.032660,41.579320,'USA','Connecticut',' US-CT ',' Housatonic River ',46.1,NULL,NULL,'','',true), + ('Dover (Deleware USA)','Dover',-75.542230,39.159670,'USA','Deleware',' US-DE ',' Schuylkill River ',110.7,NULL,NULL,'','',true), + ('Wilmington (Deleware USA)','Wilmington',-75.540200,39.740730,'USA','Deleware',' US-DE ',' Schuylkill River ',46.1,NULL,NULL,'','',true), + ('Boca Raton (Florida USA)','Boca Raton',-80.116420,26.329980,'USA','Florida',' US-FL ',' Saint Lucie Canal Okeechobee Waterway ',88.1,NULL,NULL,'','',true), + ('Clearwater (Florida USA)','Clearwater',-82.750100,27.966880,'USA','Florida',' US-FL ',' Peace River ',101.7,NULL,NULL,'','',true), + ('Daytona Beach (Florida USA)','Daytona Beach',-81.039690,29.191650,'USA','Florida',' US-FL ',' Saint Johns ',28.4,NULL,NULL,'','',true), + ('Deltona (Florida USA)','Deltona',-81.264870,28.911260,'USA','Florida',' US-FL ',' Lake Monroe ',9.0,NULL,NULL,'','',true), + ('Fort Lauderdale (Florida USA)','Fort Lauderdale',-80.135890,26.150390,'USA','Florida',' US-FL ',' Saint Lucie Canal Okeechobee Waterway ',107.1,NULL,NULL,'','',true), + ('Fort Myers (Florida USA)','Fort Myers',-81.800810,26.660020,'USA','Florida',' US-FL ',' Caloosahatchee River ',21.1,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Fort Pierce (Florida USA)','Fort Pierce',-80.329710,27.416120,'USA','Florida',' US-FL ',' Saint Lucie Canal Okeechobee Waterway ',35.8,NULL,NULL,'','',true), + ('Gainesville (Florida USA)','Gainesville',-82.308360,29.674700,'USA','Florida',' US-FL ',' Orange Lake ',26.8,NULL,NULL,'','',true), + ('Hialeah (Florida USA)','Hialeah',-80.320400,25.908860,'USA','Florida',' US-FL ',' Ninemile Canal ',118.0,NULL,NULL,'','',true), + ('Jacksonville (Florida USA)','Jacksonville',-81.664600,30.328770,'USA','Florida',' US-FL ',' North Prong Saint Marys River ',54.8,NULL,NULL,'','',true), + ('Key Largo (Florida USA)','Key Largo',-80.418740,25.103330,'USA','Florida',' US-FL ',' Ninemile Canal ',198.1,NULL,NULL,'','',true), + ('Key West (Florida USA)','Key West',-81.775750,24.559320,'USA','Florida',' US-FL ',' Caloosahatchee River ',241.9,NULL,NULL,'','',true), + ('Lake City (Florida USA)','Lake City',-82.631890,30.193830,'USA','Florida',' US-FL ',' Suwannee ',23.2,NULL,NULL,'','',true), + ('Melbourne (Florida USA)','Melbourne',-80.621680,28.079180,'USA','Florida',' US-FL ',' Lake Kissimmee ',66.8,NULL,NULL,'','',true), + ('Miami (Florida USA)','Miami',-80.224490,25.780460,'USA','Florida',' US-FL ',' Ninemile Canal ',135.1,NULL,NULL,'','',true), + ('Naples (Florida USA)','Naples',-81.773760,26.145460,'USA','Florida',' US-FL ',' Caloosahatchee River ',67.1,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Ocala (Florida USA)','Ocala',-82.116850,29.200000,'USA','Florida',' US-FL ',' Orange Lake ',29.7,NULL,NULL,'','',true), + ('Orlando (Florida USA)','Orlando',-81.349870,28.508140,'USA','Florida',' US-FL ',' East Lake Tohopekaliga ',25.1,NULL,NULL,'','',true), + ('Panama City (Florida USA)','Panama City',-85.628740,30.194280,'USA','Florida',' US-FL ',' Choctawhatchee River ',60.1,NULL,NULL,'','',true), + ('Pensacola (Florida USA)','Pensacola',-87.224810,30.459690,'USA','Florida',' US-FL ',' Escambia River ',39.7,NULL,NULL,'','',true), + ('Port Charlotte (Florida USA)','Port Charlotte',-82.081970,26.999590,'USA','Florida',' US-FL ',' Caloosahatchee River ',56.2,NULL,NULL,'','',true), + ('Port St Lucie (Florida USA)','Port St Lucie',-80.291230,27.282300,'USA','Florida',' US-FL ',' Saint Lucie Canal Okeechobee Waterway ',21.7,NULL,NULL,'','',true), + ('Sarasota (Florida USA)','Sarasota',-82.448010,27.305540,'USA','Florida',' US-FL ',' Peace River ',62.1,NULL,NULL,'','',true), + ('Sebring (Florida USA)','Sebring',-81.390690,27.493570,'USA','Florida',' US-FL ',' Lake Istokpoga ',16.3,NULL,NULL,'','',true), + ('St Augustine (Florida USA)','St Augustine',-81.360380,29.942980,'USA','Florida',' US-FL ',' Crescent Lake ',55.1,NULL,NULL,'','',true), + ('St Petersburg (Florida USA)','St Petersburg',-82.669160,27.782630,'USA','Florida',' US-FL ',' Peace River ',85.6,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Tallahassee (Florida USA)','Tallahassee',-84.274730,30.435720,'USA','Florida',' US-FL ',' Ochlockonee River ',16.0,NULL,NULL,'','',true), + ('Tampa (Florida USA)','Tampa',-82.414280,27.971630,'USA','Florida',' US-FL ',' Peace River ',75.4,NULL,NULL,'','',true), + ('Titusville (Florida USA)','Titusville',-80.843570,28.597220,'USA','Florida',' US-FL ',' Lake Harney ',26.9,NULL,NULL,'','',true), + ('West Palm Beach (Florida USA)','West Palm Beach',-80.050120,26.733550,'USA','Florida',' US-FL ',' Saint Lucie Canal Okeechobee Waterway ',50.0,NULL,NULL,'','',true), + ('Winter Haven (Florida USA)','Winter Haven',-81.735290,27.999960,'USA','Florida',' US-FL ',' South Port Canal And Short Canal ',40.4,NULL,NULL,'','',true), + ('Albany (Georgia USA)','Albany',-84.170480,31.583010,'USA','Georgia',' US-GA ',' Walter F George Reservoir ',93.5,NULL,NULL,'','',true), + ('Americus (Georgia USA)','Americus',-84.241750,32.070800,'USA','Georgia',' US-GA ',' Chattahoochee ',63.6,NULL,NULL,'','',true), + ('Athens (Georgia USA)','Athens',-83.409120,33.943290,'USA','Georgia',' US-GA ',' North Oconee Creek ',32.3,NULL,NULL,'','',true), + ('Atlanta (Georgia USA)','Atlanta',-84.397430,33.774200,'USA','Georgia',' US-GA ',' Allatoona Lake ',48.0,NULL,NULL,'','',true), + ('Augusta (Georgia USA)','Augusta',-82.008390,33.437400,'USA','Georgia',' US-GA ',' Savannah ',49.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Brunswick (Georgia USA)','Brunswick',-81.490930,31.162490,'USA','Georgia',' US-GA ',' Satilla River ',75.1,NULL,NULL,'','',true), + ('Columbus (Georgia USA)','Columbus',-84.937750,32.481460,'USA','Georgia',' US-GA ',' Chattahoochee ',16.2,NULL,NULL,'','',true), + ('Dalton (Georgia USA)','Dalton',-84.963210,34.741840,'USA','Georgia',' US-GA ',' Conasauga River ',19.1,NULL,NULL,'','',true), + ('Douglas (Georgia USA)','Douglas',-82.860060,31.556250,'USA','Georgia',' US-GA ',' Alapaha River ',45.2,NULL,NULL,'','',true), + ('Gainesville (Georgia USA)','Gainesville',-83.804970,34.318100,'USA','Georgia',' US-GA ',' Lake Sidney Lanier ',12.1,NULL,NULL,'','',true), + ('Griffin (Georgia USA)','Griffin',-84.291100,33.252290,'USA','Georgia',' US-GA ',' Alcovy River ',67.6,NULL,NULL,'','',true), + ('Hinesville (Georgia USA)','Hinesville',-81.591950,31.872390,'USA','Georgia',' US-GA ',' Altamaha ',42.3,NULL,NULL,'','',true), + ('Jesup (Georgia USA)','Jesup',-81.901560,31.603620,'USA','Georgia',' US-GA ',' Altamaha ',17.0,NULL,NULL,'','',true), + ('La Grange (Georgia USA)','La Grange',-85.020240,33.053110,'USA','Georgia',' US-GA ',' Tallapoosa River ',60.6,NULL,NULL,'','',true), + ('Macon (Georgia USA)','Macon',-83.636000,32.810060,'USA','Georgia',' US-GA ',' Ocmulgee River ',47.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Marietta (Georgia USA)','Marietta',-84.553210,33.964250,'USA','Georgia',' US-GA ',' Allatoona Lake ',23.1,NULL,NULL,'','',true), + ('Rome (Georgia USA)','Rome',-85.183360,34.243050,'USA','Georgia',' US-GA ',' Oostanaula River ',29.6,NULL,NULL,'','',true), + ('Savannah (Georgia USA)','Savannah',-81.067110,32.064520,'USA','Georgia',' US-GA ',' Altamaha ',96.2,NULL,NULL,'','',true), + ('Statesboro (Georgia USA)','Statesboro',-81.763800,32.439540,'USA','Georgia',' US-GA ',' Ogeechee River ',44.5,NULL,NULL,'','',true), + ('Tifton (Georgia USA)','Tifton',-83.470980,31.442040,'USA','Georgia',' US-GA ',' Alapaha River ',28.0,NULL,NULL,'','',true), + ('Valdosta (Georgia USA)','Valdosta',-83.242850,30.846180,'USA','Georgia',' US-GA ',' Alapaha River ',50.3,NULL,NULL,'','',true), + ('Warner Robins (Georgia USA)','Warner Robins',-83.607460,32.562020,'USA','Georgia',' US-GA ',' Ocmulgee River ',24.0,NULL,NULL,'','',true), + ('Waycross (Georgia USA)','Waycross',-82.389850,31.237180,'USA','Georgia',' US-GA ',' Satilla River ',10.8,NULL,NULL,'','',true), + ('Hilo (Hawaii USA)','Hilo',-155.106160,19.708610,'USA','Hawaii',' US-HI ',' Russian River ',3737.6,NULL,NULL,'','',true), + ('Honolulu (Hawaii USA)','Honolulu',-157.834680,21.312480,'USA','Hawaii',' US-HI ',' Russian River ',3840.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Kailua (Hawaii USA)','Kailua',-155.907500,19.526680,'USA','Hawaii',' US-HI ',' Russian River ',3813.9,NULL,NULL,'','',true), + ('Lihue (Hawaii USA)','Lihue',-159.371390,22.014440,'USA','Hawaii',' US-HI ',' Sandy River ',3798.2,NULL,NULL,'','',true), + ('Boise (Idaho USA)','Boise',-116.169290,43.539640,'USA','Idaho',' US-ID ',' Boise River ',14.2,NULL,NULL,'','',true), + ('Caldwell (Idaho USA)','Caldwell',-116.727530,43.670070,'USA','Idaho',' US-ID ',' Boise River ',40.1,NULL,NULL,'','',true), + ('Coeur dAlene (Idaho USA)','Coeur dAlene',-116.814580,47.712220,'USA','Idaho',' US-ID ',' Coeur DAlene Lake ',18.5,NULL,NULL,'','',true), + ('Grangeville (Idaho USA)','Grangeville',-116.098960,45.919840,'USA','Idaho',' US-ID ',' Middle Fork Clearwater River ',36.6,NULL,NULL,'','',true), + ('Idaho Falls (Idaho USA)','Idaho Falls',-112.035260,43.467550,'USA','Idaho',' US-ID ',' Grays Lake ',65.2,NULL,NULL,'','',true), + ('Kellogg (Idaho USA)','Kellogg',-115.969450,47.480010,'USA','Idaho',' US-ID ',' Saint Joe River ',23.9,NULL,NULL,'','',true), + ('Ketchum (Idaho USA)','Ketchum',-114.344990,43.499520,'USA','Idaho',' US-ID ',' Big Wood River ',21.0,NULL,NULL,'','',true), + ('Lewiston (Idaho USA)','Lewiston',-116.953860,46.432620,'USA','Idaho',' US-ID ',' Palouse River ',63.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Moscow (Idaho USA)','Moscow',-116.988820,46.753760,'USA','Idaho',' US-ID ',' Palouse River ',36.0,NULL,NULL,'','',true), + ('Mountain Home (Idaho USA)','Mountain Home',-115.646940,43.133980,'USA','Idaho',' US-ID ',' South Fork Boise River ',53.3,NULL,NULL,'','',true), + ('Nampa (Idaho USA)','Nampa',-116.575750,43.520520,'USA','Idaho',' US-ID ',' Boise River ',31.9,NULL,NULL,'','',true), + ('Payette (Idaho USA)','Payette',-116.869950,44.123650,'USA','Idaho',' US-ID ',' Payette River ',35.6,NULL,NULL,'','',true), + ('Pocatello (Idaho USA)','Pocatello',-112.437450,42.834420,'USA','Idaho',' US-ID ',' American Falls Reservoir ',26.9,NULL,NULL,'','',true), + ('Rexburg (Idaho USA)','Rexburg',-111.748820,43.857650,'USA','Idaho',' US-ID ',' Palisades Reservoir ',79.4,NULL,NULL,'','',true), + ('Salmon (Idaho USA)','Salmon',-113.846430,45.156450,'USA','Idaho',' US-ID ',' Clark Canyon Reservoir ',78.1,NULL,NULL,'','',true), + ('Sandpoint (Idaho USA)','Sandpoint',-116.560800,48.314230,'USA','Idaho',' US-ID ',' Lake Pend Oreille ',20.4,NULL,NULL,'','',true), + ('Soda Springs (Idaho USA)','Soda Springs',-111.581180,42.643540,'USA','Idaho',' US-ID ',' Blackfoot Reservoir ',33.2,NULL,NULL,'','',true), + ('Twin Falls (Idaho USA)','Twin Falls',-114.470600,42.540080,'USA','Idaho',' US-ID ',' Big Wood River ',88.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Alton (Illinois USA)','Alton',-90.145480,38.934230,'USA','Illinois',' US-IL ',' Carlyle Lake ',79.7,NULL,NULL,'','',true), + ('Aurora (Illinois USA)','Aurora',-88.303620,41.748940,'USA','Illinois',' US-IL ',' Des Plaines River ',41.1,NULL,NULL,'','',true), + ('Bloomington (Illinois USA)','Bloomington',-88.975020,40.483580,'USA','Illinois',' US-IL ',' Sangamon River ',51.9,NULL,NULL,'','',true), + ('Carbondale (Illinois USA)','Carbondale',-89.208600,37.755390,'USA','Illinois',' US-IL ',' Big Muddy River ',7.6,NULL,NULL,'','',true), + ('Champaign (Illinois USA)','Champaign',-88.242860,40.100760,'USA','Illinois',' US-IL ',' Middle Fork Vermilion River ',39.7,NULL,NULL,'','',true), + ('Chicago (Illinois USA)','Chicago',-87.637680,41.831740,'USA','Illinois',' US-IL ',' Des Plaines River ',37.5,NULL,NULL,'','',true), + ('Decatur (Illinois USA)','Decatur',-88.960530,39.836340,'USA','Illinois',' US-IL ',' Sangamon River ',36.5,NULL,NULL,'','',true), + ('Effingham (Illinois USA)','Effingham',-88.544150,39.110250,'USA','Illinois',' US-IL ',' Embarras River ',45.4,NULL,NULL,'','',true), + ('Elgin (Illinois USA)','Elgin',-88.235990,42.041070,'USA','Illinois',' US-IL ',' Des Plaines River ',19.8,NULL,NULL,'','',true), + ('Joliet (Illinois USA)','Joliet',-88.088330,41.558180,'USA','Illinois',' US-IL ',' Des Plaines River ',54.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Kankakee (Illinois USA)','Kankakee',-87.878390,41.119980,'USA','Illinois',' US-IL ',' Big Four Ditch River ',74.9,NULL,NULL,'','',true), + ('Mount Vernon (Illinois USA)','Mount Vernon',-88.855510,38.319620,'USA','Illinois',' US-IL ',' Rend Lake ',21.7,NULL,NULL,'','',true), + ('Peoria (Illinois USA)','Peoria',-89.643590,40.683570,'USA','Illinois',' US-IL ',' Illinois ',21.6,NULL,NULL,'','',true), + ('Quincy (Illinois USA)','Quincy',-91.394610,39.932870,'USA','Illinois',' US-IL ',' Mark Twain Lake ',59.8,NULL,NULL,'','',true), + ('Rockford (Illinois USA)','Rockford',-89.069970,42.279150,'USA','Illinois',' US-IL ',' Lake Koshkonong ',66.9,NULL,NULL,'','',true), + ('Springfield (Illinois USA)','Springfield',-89.664300,39.803930,'USA','Illinois',' US-IL ',' Sangamon River ',45.5,NULL,NULL,'','',true), + ('Urbana (Illinois USA)','Urbana',-88.178000,40.093160,'USA','Illinois',' US-IL ',' Middle Fork Vermilion River ',35.7,NULL,NULL,'','',true), + ('Bloomington (Indiana USA)','Bloomington',-86.483890,39.137210,'USA','Indiana',' US-IN ',' Monroe Lake ',10.3,NULL,NULL,'','',true), + ('Columbus (Indiana USA)','Columbus',-85.885060,39.214070,'USA','Indiana',' US-IN ',' Driftwood River ',11.6,NULL,NULL,'','',true), + ('Evansville (Indiana USA)','Evansville',-87.532620,37.970170,'USA','Indiana',' US-IN ',' Saint Francis River ',49.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Fort Wayne (Indiana USA)','Fort Wayne',-85.096230,41.067940,'USA','Indiana',' US-IN ',' Grand Lake Saint Marys ',78.3,NULL,NULL,'','',true), + ('Gary (Indiana USA)','Gary',-87.373460,41.570010,'USA','Indiana',' US-IN ',' Kankakee ',52.7,NULL,NULL,'','',true), + ('Indianapolis (Indiana USA)','Indianapolis',-86.094280,39.781930,'USA','Indiana',' US-IN ',' Driftwood River ',56.2,NULL,NULL,'','',true), + ('Kokomo (Indiana USA)','Kokomo',-86.154010,40.477130,'USA','Indiana',' US-IN ',' Tippecanoe River ',71.4,NULL,NULL,'','',true), + ('Lafayette (Indiana USA)','Lafayette',-86.891120,40.396590,'USA','Indiana',' US-IN ',' Middle Fork Vermilion River ',82.1,NULL,NULL,'','',true), + ('Marion (Indiana USA)','Marion',-85.671280,40.562050,'USA','Indiana',' US-IN ',' Tippecanoe River ',80.1,NULL,NULL,'','',true), + ('Muncie (Indiana USA)','Muncie',-85.385060,40.185480,'USA','Indiana',' US-IN ',' Brookville Lake ',82.2,NULL,NULL,'','',true), + ('South Bend (Indiana USA)','South Bend',-86.241650,41.673910,'USA','Indiana',' US-IN ',' Tippecanoe River ',62.6,NULL,NULL,'','',true), + ('Terre Haute (Indiana USA)','Terre Haute',-87.345470,39.468430,'USA','Indiana',' US-IN ',' Wabash ',33.5,NULL,NULL,'','',true), + ('Vincennes (Indiana USA)','Vincennes',-87.463290,38.691590,'USA','Indiana',' US-IN ',' Saint Francis River ',73.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Ames (Iowa USA)','Ames',-93.632780,42.034490,'USA','Iowa',' US-IA ',' Des Moines ',14.8,NULL,NULL,'','',true), + ('Burlington (Iowa USA)','Burlington',-91.119350,40.817820,'USA','Iowa',' US-IA ',' Skunk River ',42.4,NULL,NULL,'','',true), + ('Cedar Rapids (Iowa USA)','Cedar Rapids',-91.607280,41.974700,'USA','Iowa',' US-IA ',' Coralville Lake ',17.5,NULL,NULL,'','',true), + ('Charles City (Iowa USA)','Charles City',-92.683500,43.083000,'USA','Iowa',' US-IA ',' Turkey Creek ',82.5,NULL,NULL,'','',true), + ('Council Bluffs (Iowa USA)','Council Bluffs',-95.782770,41.349380,'USA','Iowa',' US-IA ',' West Nishnabotna River ',35.5,NULL,NULL,'','',true), + ('Davenport (Iowa USA)','Davenport',-90.530540,41.546390,'USA','Iowa',' US-IA ',' Mississippi River ',61.8,NULL,NULL,'','',true), + ('Decorah (Iowa USA)','Decorah',-91.789560,43.310170,'USA','Iowa',' US-IA ',' Turkey Creek ',32.6,NULL,NULL,'','',true), + ('Des Moines (Iowa USA)','Des Moines',-93.621320,41.560390,'USA','Iowa',' US-IA ',' Saylorville Lake ',26.5,NULL,NULL,'','',true), + ('Dubuque (Iowa USA)','Dubuque',-90.668300,42.463510,'USA','Iowa',' US-IA ',' Mississippi River ',64.0,NULL,NULL,'','',true), + ('Fort Dodge (Iowa USA)','Fort Dodge',-94.207300,42.529170,'USA','Iowa',' US-IA ',' North Racoon River ',54.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Iowa City (Iowa USA)','Iowa City',-91.504710,41.625910,'USA','Iowa',' US-IA ',' Coralville Lake ',24.8,NULL,NULL,'','',true), + ('Marshalltown (Iowa USA)','Marshalltown',-92.935650,42.048460,'USA','Iowa',' US-IA ',' Iowa River ',21.2,NULL,NULL,'','',true), + ('Mason City (Iowa USA)','Mason City',-93.245140,43.165170,'USA','Iowa',' US-IA ',' West Branch Iowa River ',40.6,NULL,NULL,'','',true), + ('Ottumwa (Iowa USA)','Ottumwa',-92.418040,41.048120,'USA','Iowa',' US-IA ',' Rathbun Lake ',54.2,NULL,NULL,'','',true), + ('Sioux City (Iowa USA)','Sioux City',-96.357870,42.483950,'USA','Iowa',' US-IA ',' Grand River ',48.3,NULL,NULL,'','',true), + ('Spencer (Iowa USA)','Spencer',-95.153270,43.162190,'USA','Iowa',' US-IA ',' Little Sioux River ',46.6,NULL,NULL,'','',true), + ('Storm Lake (Iowa USA)','Storm Lake',-95.114750,42.730950,'USA','Iowa',' US-IA ',' Little Sioux River ',35.3,NULL,NULL,'','',true), + ('Waterloo (Iowa USA)','Waterloo',-92.401310,42.477700,'USA','Iowa',' US-IA ',' Elk River ',43.2,NULL,NULL,'','',true), + ('Arkansas City (Kansas USA)','Arkansas City',-97.041380,37.067650,'USA','Kansas',' US-KS ',' Kaw Lake ',34.9,NULL,NULL,'','',true), + ('Atchison (Kansas USA)','Atchison',-95.121530,39.561720,'USA','Kansas',' US-KS ',' Platte River ',39.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Coffeyville (Kansas USA)','Coffeyville',-95.599590,37.042180,'USA','Kansas',' US-KS ',' Verdigris River ',17.2,NULL,NULL,'','',true), + ('Colby (Kansas USA)','Colby',-101.041160,39.402970,'USA','Kansas',' US-KS ',' S Fork Republican ',77.9,NULL,NULL,'','',true), + ('Dodge City (Kansas USA)','Dodge City',-100.015590,37.780220,'USA','Kansas',' US-KS ',' Medicine Lodge River ',145.2,NULL,NULL,'','',true), + ('El Dorado (Kansas USA)','El Dorado',-96.826090,37.816910,'USA','Kansas',' US-KS ',' El Dorado Lake ',6.6,NULL,NULL,'','',true), + ('Emporia (Kansas USA)','Emporia',-96.121540,38.394340,'USA','Kansas',' US-KS ',' Melvern Lake ',31.2,NULL,NULL,'','',true), + ('Garden City (Kansas USA)','Garden City',-100.921560,37.979240,'USA','Kansas',' US-KS ',' Optima Lake ',146.5,NULL,NULL,'','',true), + ('Great Bend (Kansas USA)','Great Bend',-98.766580,38.371180,'USA','Kansas',' US-KS ',' Smoky Hill River ',46.3,NULL,NULL,'','',true), + ('Hays (Kansas USA)','Hays',-99.341290,38.870910,'USA','Kansas',' US-KS ',' Smoky Hill River ',59.1,NULL,NULL,'','',true), + ('Hutchinson (Kansas USA)','Hutchinson',-97.908000,38.071700,'USA','Kansas',' US-KS ',' Cheney Reservoir ',35.5,NULL,NULL,'','',true), + ('Kansas City (Kansas USA)','Kansas City',-94.711640,39.130200,'USA','Kansas',' US-KS ',' Perry Lake ',64.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Lawrence (Kansas USA)','Lawrence',-95.215020,38.959380,'USA','Kansas',' US-KS ',' Clinton Lake ',19.2,NULL,NULL,'','',true), + ('Leavenworth (Kansas USA)','Leavenworth',-94.932570,39.335610,'USA','Kansas',' US-KS ',' Perry Lake ',46.8,NULL,NULL,'','',true), + ('Liberal (Kansas USA)','Liberal',-100.923210,37.045570,'USA','Kansas',' US-KS ',' Optima Lake ',46.8,NULL,NULL,'','',true), + ('Manhattan (Kansas USA)','Manhattan',-96.568550,39.190800,'USA','Kansas',' US-KS ',' Tuttle Creek Lake ',28.8,NULL,NULL,'','',true), + ('Marysville (Kansas USA)','Marysville',-96.670340,39.843160,'USA','Kansas',' US-KS ',' Tuttle Creek Lake ',44.5,NULL,NULL,'','',true), + ('McPherson (Kansas USA)','McPherson',-97.683500,38.370510,'USA','Kansas',' US-KS ',' North Cottonwood River ',33.5,NULL,NULL,'','',true), + ('Oberlin (Kansas USA)','Oberlin',-100.527640,39.785760,'USA','Kansas',' US-KS ',' S Fork Republican ',97.8,NULL,NULL,'','',true), + ('Ottawa (Kansas USA)','Ottawa',-95.263190,38.601940,'USA','Kansas',' US-KS ',' Marais des Cygnes ',26.2,NULL,NULL,'','',true), + ('Phillipsburg (Kansas USA)','Phillipsburg',-99.372110,39.749460,'USA','Kansas',' US-KS ',' North Fork Solomon River ',16.8,NULL,NULL,'','',true), + ('Pittsburg (Kansas USA)','Pittsburg',-94.704490,37.407780,'USA','Kansas',' US-KS ',' Big Sandy River ',65.2,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Pratt (Kansas USA)','Pratt',-98.729430,37.624570,'USA','Kansas',' US-KS ',' Medicine Lodge River ',53.5,NULL,NULL,'','',true), + ('Salina (Kansas USA)','Salina',-97.635600,38.846870,'USA','Kansas',' US-KS ',' North Cottonwood River ',47.8,NULL,NULL,'','',true), + ('Scott City (Kansas USA)','Scott City',-100.887410,38.458470,'USA','Kansas',' US-KS ',' South Fork Solomon River ',162.5,NULL,NULL,'','',true), + ('Topeka (Kansas USA)','Topeka',-95.686680,39.021340,'USA','Kansas',' US-KS ',' Kansas ',8.9,NULL,NULL,'','',true), + ('Wichita (Kansas USA)','Wichita',-97.360660,37.687100,'USA','Kansas',' US-KS ',' Cheney Reservoir ',42.8,NULL,NULL,'','',true), + ('Ashland (Kentucky USA)','Ashland',-82.739910,38.503800,'USA','Kentucky',' US-KY ',' Cave Run Lake ',81.2,NULL,NULL,'','',true), + ('Bowling Green (Kentucky USA)','Bowling Green',-86.428720,36.957800,'USA','Kentucky',' US-KY ',' Barren River ',8.1,NULL,NULL,'','',true), + ('Cairo (Kentucky USA)','Cairo',-89.131870,37.005950,'USA','Kentucky',' US-KY ',' Big Muddy River ',87.4,NULL,NULL,'','',true), + ('Frankfort (Kentucky USA)','Frankfort',-84.856980,38.174230,'USA','Kentucky',' US-KY ',' Beech Fork ',59.0,NULL,NULL,'','',true), + ('Hazard (Kentucky USA)','Hazard',-83.178150,37.241080,'USA','Kentucky',' US-KY ',' Middle Fork Kentucky River ',28.6,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Lexington (Kentucky USA)','Lexington',-84.497930,38.034550,'USA','Kentucky',' US-KY ',' Kentucky ',40.2,NULL,NULL,'','',true), + ('Louisville (Kentucky USA)','Louisville',-85.769600,38.228850,'USA','Kentucky',' US-KY ',' Rolling Fork ',65.3,NULL,NULL,'','',true), + ('Madison (Kentucky USA)','Madison',-85.436000,38.710160,'USA','Kentucky',' US-KY ',' Driftwood River ',79.5,NULL,NULL,'','',true), + ('Madisonville (Kentucky USA)','Madisonville',-87.527080,37.357780,'USA','Kentucky',' US-KY ',' Lake Barkley ',67.5,NULL,NULL,'','',true), + ('Middlesboro (Kentucky USA)','Middlesboro',-83.724470,36.617480,'USA','Kentucky',' US-KY ',' Norris Lake ',35.7,NULL,NULL,'','',true), + ('Owensboro (Kentucky USA)','Owensboro',-87.127370,37.739140,'USA','Kentucky',' US-KY ',' Saint Francis River ',44.9,NULL,NULL,'','',true), + ('Paducah (Kentucky USA)','Paducah',-88.608100,37.096830,'USA','Kentucky',' US-KY ',' Lake Barkley ',57.6,NULL,NULL,'','',true), + ('Richmond (Kentucky USA)','Richmond',-84.275070,37.748250,'USA','Kentucky',' US-KY ',' Kentucky ',11.9,NULL,NULL,'','',true), + ('Somerset (Kentucky USA)','Somerset',-84.577110,37.078350,'USA','Kentucky',' US-KY ',' Laurel River Lake ',32.6,NULL,NULL,'','',true), + ('Alexandria (Louisiana USA)','Alexandria',-92.441180,31.328110,'USA','Louisiana',' US-LA ',' Catahoula Lake ',35.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Baton Rouge (Louisiana USA)','Baton Rouge',-91.179520,30.452820,'USA','Louisiana',' US-LA ',' Lake Verret ',63.2,NULL,NULL,'','',true), + ('De Ridder (Louisiana USA)','De Ridder',-93.321560,30.848710,'USA','Louisiana',' US-LA ',' Calcasieu River ',38.4,NULL,NULL,'','',true), + ('Houma (Louisiana USA)','Houma',-90.636920,29.626720,'USA','Louisiana',' US-LA ',' Bayou Lafourche ',11.7,NULL,NULL,'','',true), + ('Lafayette (Louisiana USA)','Lafayette',-92.036870,30.233060,'USA','Louisiana',' US-LA ',' Grand Lake ',73.3,NULL,NULL,'','',true), + ('Lake Charles (Louisiana USA)','Lake Charles',-93.201510,30.232130,'USA','Louisiana',' US-LA ',' Calcasieu River ',45.0,NULL,NULL,'','',true), + ('Monroe (Louisiana USA)','Monroe',-92.089250,32.526110,'USA','Louisiana',' US-LA ',' Little River ',39.2,NULL,NULL,'','',true), + ('Morgan City (Louisiana USA)','Morgan City',-91.182560,29.650240,'USA','Louisiana',' US-LA ',' Unnamed ',5.7,NULL,NULL,'','',true), + ('New Iberia (Louisiana USA)','New Iberia',-91.774030,30.004960,'USA','Louisiana',' US-LA ',' Grand Lake ',39.3,NULL,NULL,'','',true), + ('New Orleans (Louisiana USA)','New Orleans',-90.062620,29.941080,'USA','Louisiana',' US-LA ',' Lac des Allemands ',49.8,NULL,NULL,'','',true), + ('Shreveport (Louisiana USA)','Shreveport',-93.759830,32.534740,'USA','Louisiana',' US-LA ',' Twelvemile Bayou ',19.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Tallulah (Louisiana USA)','Tallulah',-91.167260,32.437500,'USA','Louisiana',' US-LA ',' Little River ',51.9,NULL,NULL,'','',true), + ('Augusta (Maine USA)','Augusta',-69.781410,44.321660,'USA','Maine',' US-ME ',' Kennebec ',60.9,NULL,NULL,'','',true), + ('Bangor (Maine USA)','Bangor',-68.776190,44.811890,'USA','Maine',' US-ME ',' Penobscot River ',38.2,NULL,NULL,'','',true), + ('Belfast (Maine USA)','Belfast',-69.007710,44.417070,'USA','Maine',' US-ME ',' Kennebec ',80.6,NULL,NULL,'','',true), + ('Biddeford (Maine USA)','Biddeford',-70.476340,43.460180,'USA','Maine',' US-ME ',' Sebago Lake ',46.0,NULL,NULL,'','',true), + ('Calais (Maine USA)','Calais',-67.249070,45.121820,'USA','Maine',' US-ME ',' Saint Croix River ',37.4,NULL,NULL,'','',true), + ('Houlton (Maine USA)','Houlton',-67.950640,46.093980,'USA','Maine',' US-ME ',' Monument Brook ',28.2,NULL,NULL,'','',true), + ('Lewiston (Maine USA)','Lewiston',-70.194060,44.109720,'USA','Maine',' US-ME ',' Sebago Lake ',38.8,NULL,NULL,'','',true), + ('Portland (Maine USA)','Portland',-70.277580,43.698550,'USA','Maine',' US-ME ',' Sebago Lake ',28.9,NULL,NULL,'','',true), + ('Presque Isle (Maine USA)','Presque Isle',-68.014360,46.716560,'USA','Maine',' US-ME ',' Aroostook River ',16.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Skowhegan (Maine USA)','Skowhegan',-69.708970,44.767900,'USA','Maine',' US-ME ',' Kennebec ',13.5,NULL,NULL,'','',true), + ('Waterville (Maine USA)','Waterville',-69.620730,44.537240,'USA','Maine',' US-ME ',' Kennebec ',39.7,NULL,NULL,'','',true), + ('Annapolis (Maryland USA)','Annapolis',-76.542570,38.955880,'USA','Maryland',' US-MD ',' Rappahannock River ',109.5,NULL,NULL,'','',true), + ('Baltimore (Maryland USA)','Baltimore',-76.571450,39.300980,'USA','Maryland',' US-MD ',' Potomac ',98.2,NULL,NULL,'','',true), + ('Frederick (Maryland USA)','Frederick',-77.369390,39.438070,'USA','Maryland',' US-MD ',' Potomac ',29.8,NULL,NULL,'','',true), + ('Hagerstown (Maryland USA)','Hagerstown',-77.703160,39.647260,'USA','Maryland',' US-MD ',' Potomac ',29.6,NULL,NULL,'','',true), + ('Washington (Maryland USA)','Washington',-76.970770,38.951440,'USA','Maryland',' US-MD ',' Rappahannock River ',79.5,NULL,NULL,'','',true), + ('Boston (Massachusetts USA)','Boston',-71.080080,42.362830,'USA','Massachusetts',' US-MA ',' Quabbin Reservoir ',101.5,NULL,NULL,'','',true), + ('Fall River (Massachusetts USA)','Fall River',-71.104890,41.717710,'USA','Massachusetts',' US-MA ',' Pawcatuck River ',66.7,NULL,NULL,'','',true), + ('Lowell (Massachusetts USA)','Lowell',-71.318560,42.662090,'USA','Massachusetts',' US-MA ',' Merrimack ',67.2,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('New Bedford (Massachusetts USA)','New Bedford',-70.915070,41.658980,'USA','Massachusetts',' US-MA ',' Pawcatuck River ',78.2,NULL,NULL,'','',true), + ('Springfield (Massachusetts USA)','Springfield',-72.474590,42.111860,'USA','Massachusetts',' US-MA ',' Chicopee River ',7.4,NULL,NULL,'','',true), + ('Worcester (Massachusetts USA)','Worcester',-71.838700,42.270250,'USA','Massachusetts',' US-MA ',' Quabbin Reservoir ',41.4,NULL,NULL,'','',true), + ('Alpena (Michigan USA)','Alpena',-83.473750,45.077480,'USA','Michigan',' US-MI ',' Au Sable River ',64.3,NULL,NULL,'','',true), + ('Ann Arbor (Michigan USA)','Ann Arbor',-83.726440,42.272470,'USA','Michigan',' US-MI ',' Lake Saint Clair ',84.6,NULL,NULL,'','',true), + ('Bay City (Michigan USA)','Bay City',-83.884480,43.594520,'USA','Michigan',' US-MI ',' Saginaw River ',8.1,NULL,NULL,'','',true), + ('Detroit (Michigan USA)','Detroit',-83.068370,42.368250,'USA','Michigan',' US-MI ',' Lake Saint Clair ',30.1,NULL,NULL,'','',true), + ('Escanaba (Michigan USA)','Escanaba',-87.130180,45.737360,'USA','Michigan',' US-MI ',' Menominee River ',60.4,NULL,NULL,'','',true), + ('Flint (Michigan USA)','Flint',-83.722800,43.051930,'USA','Michigan',' US-MI ',' Shiawassee River ',44.5,NULL,NULL,'','',true), + ('Grand Rapids (Michigan USA)','Grand Rapids',-85.626630,42.947700,'USA','Michigan',' US-MI ',' Kalamazoo River ',55.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Houghton (Michigan USA)','Houghton',-88.610940,47.078540,'USA','Michigan',' US-MI ',' West Branch Peshekee River ',66.4,NULL,NULL,'','',true), + ('Iron Mountain (Michigan USA)','Iron Mountain',-88.074570,45.849330,'USA','Michigan',' US-MI ',' Menominee River ',35.3,NULL,NULL,'','',true), + ('Ironwood (Michigan USA)','Ironwood',-90.132780,46.485690,'USA','Michigan',' US-MI ',' Pigeon River ',32.8,NULL,NULL,'','',true), + ('Jackson (Michigan USA)','Jackson',-84.469070,42.312110,'USA','Michigan',' US-MI ',' Kalamazoo River ',94.2,NULL,NULL,'','',true), + ('Kalamazoo (Michigan USA)','Kalamazoo',-85.582490,42.312740,'USA','Michigan',' US-MI ',' Kalamazoo River ',15.3,NULL,NULL,'','',true), + ('Lansing (Michigan USA)','Lansing',-84.571170,42.771940,'USA','Michigan',' US-MI ',' Shiawassee River ',81.1,NULL,NULL,'','',true), + ('Ludington (Michigan USA)','Ludington',-86.368180,43.933510,'USA','Michigan',' US-MI ',' Muskegon River ',89.0,NULL,NULL,'','',true), + ('Marquette (Michigan USA)','Marquette',-87.422610,46.536510,'USA','Michigan',' US-MI ',' Peshekee River ',44.9,NULL,NULL,'','',true), + ('Midland (Michigan USA)','Midland',-84.232710,43.606730,'USA','Michigan',' US-MI ',' Tittabawassee River ',26.3,NULL,NULL,'','',true), + ('Muskegon (Michigan USA)','Muskegon',-86.236070,43.216400,'USA','Michigan',' US-MI ',' Kalamazoo River ',99.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Petoskey (Michigan USA)','Petoskey',-84.960800,45.340180,'USA','Michigan',' US-MI ',' Burt Lake ',27.3,NULL,NULL,'','',true), + ('Pontiac (Michigan USA)','Pontiac',-83.285740,42.626940,'USA','Michigan',' US-MI ',' Lake Saint Clair ',47.7,NULL,NULL,'','',true), + ('Port Huron (Michigan USA)','Port Huron',-82.473270,42.952800,'USA','Michigan',' US-MI ',' St Clair ',20.2,NULL,NULL,'','',true), + ('Saginaw (Michigan USA)','Saginaw',-83.955300,43.413190,'USA','Michigan',' US-MI ',' Shiawassee River ',6.7,NULL,NULL,'','',true), + ('Sault Ste Marie (Michigan USA)','Sault Ste Marie',-84.351890,46.466580,'USA','Michigan',' US-MI ',' St Marys River ',9.0,NULL,NULL,'','',true), + ('Traverse City (Michigan USA)','Traverse City',-85.631310,44.747770,'USA','Michigan',' US-MI ',' Manistee River ',30.0,NULL,NULL,'','',true), + ('Albert Lea (Minnesota USA)','Albert Lea',-93.375530,43.641680,'USA','Minnesota',' US-MN ',' West Branch Iowa River ',70.4,NULL,NULL,'','',true), + ('Bemidji (Minnesota USA)','Bemidji',-94.855190,47.482280,'USA','Minnesota',' US-MN ',' Cass Lake ',23.0,NULL,NULL,'','',true), + ('Brainerd (Minnesota USA)','Brainerd',-94.179530,46.354570,'USA','Minnesota',' US-MN ',' North Long Lake ',10.5,NULL,NULL,'','',true), + ('Crookston (Minnesota USA)','Crookston',-96.551490,47.765440,'USA','Minnesota',' US-MN ',' Red Lake River ',28.5,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Duluth (Minnesota USA)','Duluth',-92.156950,46.798480,'USA','Minnesota',' US-MN ',' Saint Louis ',35.1,NULL,NULL,'','',true), + ('Ely (Minnesota USA)','Ely',-91.863040,47.903800,'USA','Minnesota',' US-MN ',' Basswood Lake ',17.2,NULL,NULL,'','',true), + ('Fairmont (Minnesota USA)','Fairmont',-94.421430,43.633960,'USA','Minnesota',' US-MN ',' East Fork Des Moines River ',42.2,NULL,NULL,'','',true), + ('Faribault (Minnesota USA)','Faribault',-93.256900,44.282600,'USA','Minnesota',' US-MN ',' Minnesota ',133.8,NULL,NULL,'','',true), + ('Fergus Falls (Minnesota USA)','Fergus Falls',-96.055510,46.279230,'USA','Minnesota',' US-MN ',' Otter Tail Creek ',21.5,NULL,NULL,'','',true), + ('Grand Marais (Minnesota USA)','Grand Marais',-90.148550,47.837390,'USA','Minnesota',' US-MN ',' Arrow River ',35.8,NULL,NULL,'','',true), + ('Grand Rapids (Minnesota USA)','Grand Rapids',-93.513670,47.270230,'USA','Minnesota',' US-MN ',' Pokegama Lake ',9.2,NULL,NULL,'','',true), + ('Hibbing (Minnesota USA)','Hibbing',-92.951970,47.433380,'USA','Minnesota',' US-MN ',' Pokegama Lake ',54.4,NULL,NULL,'','',true), + ('International Falls (Minnesota USA)','International Falls',-93.378260,48.550070,'USA','Minnesota',' US-MN ',' Rainy Lake ',28.2,NULL,NULL,'','',true), + ('Little Falls (Minnesota USA)','Little Falls',-94.316230,45.980300,'USA','Minnesota',' US-MN ',' North Long Lake ',51.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Mankato (Minnesota USA)','Mankato',-93.976580,44.141760,'USA','Minnesota',' US-MN ',' Minnesota ',94.3,NULL,NULL,'','',true), + ('Marshall (Minnesota USA)','Marshall',-95.773790,44.505740,'USA','Minnesota',' US-MN ',' Minnesota ',80.1,NULL,NULL,'','',true), + ('Minneapolis (Minnesota USA)','Minneapolis',-93.302660,44.910910,'USA','Minnesota',' US-MN ',' St Croix ',105.9,NULL,NULL,'','',true), + ('Moorhead (Minnesota USA)','Moorhead',-96.696480,46.858070,'USA','Minnesota',' US-MN ',' Otter Tail Creek ',75.3,NULL,NULL,'','',true), + ('Rochester (Minnesota USA)','Rochester',-92.420930,44.020560,'USA','Minnesota',' US-MN ',' Red Cedar River ',125.5,NULL,NULL,'','',true), + ('St Cloud (Minnesota USA)','St Cloud',-94.168530,45.547420,'USA','Minnesota',' US-MN ',' Mille Lacs Lake ',84.6,NULL,NULL,'','',true), + ('St Paul (Minnesota USA)','St Paul',-93.088440,44.972410,'USA','Minnesota',' US-MN ',' St Croix ',91.0,NULL,NULL,'','',true), + ('Thief River Falls (Minnesota USA)','Thief River Falls',-96.221090,48.116250,'USA','Minnesota',' US-MN ',' Red Lake River ',19.9,NULL,NULL,'','',true), + ('Willmar (Minnesota USA)','Willmar',-95.045820,45.133550,'USA','Minnesota',' US-MN ',' Minnesota ',47.3,NULL,NULL,'','',true), + ('Winona (Minnesota USA)','Winona',-91.552080,44.012050,'USA','Minnesota',' US-MN ',' Turkey Creek ',109.6,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Worthington (Minnesota USA)','Worthington',-95.590830,43.609090,'USA','Minnesota',' US-MN ',' Floyd River ',73.7,NULL,NULL,'','',true), + ('Biloxi (Mississippi USA)','Biloxi',-88.921890,30.429120,'USA','Mississippi',' US-MS ',' Pascagoula River ',37.7,NULL,NULL,'','',true), + ('Brookhaven (Mississippi USA)','Brookhaven',-90.440340,31.547340,'USA','Mississippi',' US-MS ',' Pearl ',58.1,NULL,NULL,'','',true), + ('Cleveland (Mississippi USA)','Cleveland',-90.722140,33.729910,'USA','Mississippi',' US-MS ',' Tallahatchie River ',45.4,NULL,NULL,'','',true), + ('Columbus (Mississippi USA)','Columbus',-88.403680,33.460710,'USA','Mississippi',' US-MS ',' Sipsey River ',52.8,NULL,NULL,'','',true), + ('Corinth (Mississippi USA)','Corinth',-88.530410,34.929430,'USA','Mississippi',' US-MS ',' Pickwick Lake ',34.0,NULL,NULL,'','',true), + ('Greenville (Mississippi USA)','Greenville',-91.034540,33.387810,'USA','Mississippi',' US-MS ',' Yazoo River ',72.2,NULL,NULL,'','',true), + ('Grenada (Mississippi USA)','Grenada',-89.817170,33.774710,'USA','Mississippi',' US-MS ',' Yalobusha River ',13.5,NULL,NULL,'','',true), + ('Gulfport (Mississippi USA)','Gulfport',-89.092470,30.399050,'USA','Mississippi',' US-MS ',' Pascagoula River ',52.1,NULL,NULL,'','',true), + ('Hattiesburg (Mississippi USA)','Hattiesburg',-89.323640,31.315450,'USA','Mississippi',' US-MS ',' Leaf River ',36.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Jackson (Mississippi USA)','Jackson',-90.198460,32.324880,'USA','Mississippi',' US-MS ',' Ross R Barnett Reservoir ',24.9,NULL,NULL,'','',true), + ('Laurel (Mississippi USA)','Laurel',-89.143210,31.717430,'USA','Mississippi',' US-MS ',' Leaf River ',13.0,NULL,NULL,'','',true), + ('McComb (Mississippi USA)','McComb',-90.492800,31.231310,'USA','Mississippi',' US-MS ',' Pearl ',74.1,NULL,NULL,'','',true), + ('Meridian (Mississippi USA)','Meridian',-88.736320,32.376390,'USA','Mississippi',' US-MS ',' Okatibbee Creek ',9.9,NULL,NULL,'','',true), + ('Natchez (Mississippi USA)','Natchez',-91.299360,31.580360,'USA','Mississippi',' US-MS ',' Black River Lake ',46.6,NULL,NULL,'','',true), + ('Oxford (Mississippi USA)','Oxford',-89.468830,34.366440,'USA','Mississippi',' US-MS ',' Little Tallahatchie River ',19.8,NULL,NULL,'','',true), + ('Pascagoula (Mississippi USA)','Pascagoula',-88.558580,30.393970,'USA','Mississippi',' US-MS ',' Pascagoula River ',33.4,NULL,NULL,'','',true), + ('Starkville (Mississippi USA)','Starkville',-88.831630,33.459740,'USA','Mississippi',' US-MS ',' Yockanookany River ',70.5,NULL,NULL,'','',true), + ('Tupelo (Mississippi USA)','Tupelo',-88.731950,34.223670,'USA','Mississippi',' US-MS ',' Big Brown Creek ',48.9,NULL,NULL,'','',true), + ('Vicksburg (Mississippi USA)','Vicksburg',-90.863710,32.378080,'USA','Mississippi',' US-MS ',' Yazoo River ',64.5,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Branson (Missouri USA)','Branson',-93.234240,36.661090,'USA','Missouri',' US-MO ',' Table Rock Lake ',21.1,NULL,NULL,'','',true), + ('Cape Girardeau (Missouri USA)','Cape Girardeau',-89.523710,37.326950,'USA','Missouri',' US-MO ',' Big Muddy River ',54.7,NULL,NULL,'','',true), + ('Columbia (Missouri USA)','Columbia',-92.294560,38.957690,'USA','Missouri',' US-MO ',' Mark Twain Lake ',73.4,NULL,NULL,'','',true), + ('Farmington (Missouri USA)','Farmington',-90.431130,37.803710,'USA','Missouri',' US-MO ',' East Fork Black River ',46.9,NULL,NULL,'','',true), + ('Fulton (Missouri USA)','Fulton',-91.940470,38.841800,'USA','Missouri',' US-MO ',' Mark Twain Lake ',74.1,NULL,NULL,'','',true), + ('Hannibal (Missouri USA)','Hannibal',-91.387440,39.707300,'USA','Missouri',' US-MO ',' Mark Twain Lake ',42.8,NULL,NULL,'','',true), + ('Jefferson City (Missouri USA)','Jefferson City',-92.174130,38.591690,'USA','Missouri',' US-MO ',' Osage Fork Gasconade River ',70.1,NULL,NULL,'','',true), + ('Joplin (Missouri USA)','Joplin',-94.487180,37.106520,'USA','Missouri',' US-MO ',' Big Sandy River ',36.1,NULL,NULL,'','',true), + ('Kansas City (Missouri USA)','Kansas City',-94.585010,39.060530,'USA','Missouri',' US-MO ',' Clinton Lake ',74.7,NULL,NULL,'','',true), + ('Kirksville (Missouri USA)','Kirksville',-92.634710,40.208040,'USA','Missouri',' US-MO ',' Chariton River ',48.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Lebanon (Missouri USA)','Lebanon',-92.628060,37.722470,'USA','Missouri',' US-MO ',' Osage Fork Gasconade River ',48.1,NULL,NULL,'','',true), + ('Maryville (Missouri USA)','Maryville',-94.894530,40.340160,'USA','Missouri',' US-MO ',' Nodaway River ',14.0,NULL,NULL,'','',true), + ('Nevada (Missouri USA)','Nevada',-94.383470,37.827270,'USA','Missouri',' US-MO ',' Little Osage River ',39.2,NULL,NULL,'','',true), + ('Poplar Bluff (Missouri USA)','Poplar Bluff',-90.408550,36.759230,'USA','Missouri',' US-MO ',' Lake Wappapello ',29.0,NULL,NULL,'','',true), + ('Rolla (Missouri USA)','Rolla',-91.791500,37.926630,'USA','Missouri',' US-MO ',' Osage Fork Gasconade River ',33.5,NULL,NULL,'','',true), + ('Sikeston (Missouri USA)','Sikeston',-89.608040,36.893950,'USA','Missouri',' US-MO ',' Lake Wappapello ',69.0,NULL,NULL,'','',true), + ('Springfield (Missouri USA)','Springfield',-93.300540,37.189750,'USA','Missouri',' US-MO ',' Stockton Lake ',57.6,NULL,NULL,'','',true), + ('St Joseph (Missouri USA)','St Joseph',-94.845490,39.779160,'USA','Missouri',' US-MO ',' Platte River ',6.7,NULL,NULL,'','',true), + ('St Louis (Missouri USA)','St Louis',-90.268310,38.647230,'USA','Missouri',' US-MO ',' Meramec River ',85.7,NULL,NULL,'','',true), + ('Anaconda (Montana USA)','Anaconda',-112.978750,46.138970,'USA','Montana',' US-MT ',' Big Hole River ',57.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Billings (Montana USA)','Billings',-108.537080,45.818970,'USA','Montana',' US-MT ',' Yellowstone ',46.6,NULL,NULL,'','',true), + ('Bozeman (Montana USA)','Bozeman',-111.024720,45.664370,'USA','Montana',' US-MT ',' Gallitin River ',35.5,NULL,NULL,'','',true), + ('Butte (Montana USA)','Butte',-112.522970,46.021840,'USA','Montana',' US-MT ',' Jefferson River ',48.7,NULL,NULL,'','',true), + ('Deer Lodge (Montana USA)','Deer Lodge',-112.711310,46.377370,'USA','Montana',' US-MT ',' Blackfoot River ',76.0,NULL,NULL,'','',true), + ('Dillon (Montana USA)','Dillon',-112.637990,45.174240,'USA','Montana',' US-MT ',' Beaverhead Creek ',23.9,NULL,NULL,'','',true), + ('Glasgow (Montana USA)','Glasgow',-106.612110,48.246780,'USA','Montana',' US-MT ',' Walker Lake ',47.9,NULL,NULL,'','',true), + ('Glendive (Montana USA)','Glendive',-104.704840,47.104690,'USA','Montana',' US-MT ',' Little Missouri River ',98.6,NULL,NULL,'','',true), + ('Great Falls (Montana USA)','Great Falls',-111.228860,47.498820,'USA','Montana',' US-MT ',' Sun River ',71.8,NULL,NULL,'','',true), + ('Hamilton (Montana USA)','Hamilton',-114.161150,46.201770,'USA','Montana',' US-MT ',' Bitterroot River ',32.4,NULL,NULL,'','',true), + ('Havre (Montana USA)','Havre',-109.705710,48.531580,'USA','Montana',' US-MT ',' Milk River ',27.6,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Helena (Montana USA)','Helena',-112.038360,46.582600,'USA','Montana',' US-MT ',' Canyon Ferry Lake ',36.2,NULL,NULL,'','',true), + ('Kalispell (Montana USA)','Kalispell',-114.358310,48.214060,'USA','Montana',' US-MT ',' Flathead ',7.1,NULL,NULL,'','',true), + ('Lewistown (Montana USA)','Lewistown',-109.462800,47.056910,'USA','Montana',' US-MT ',' Musselshell River ',73.8,NULL,NULL,'','',true), + ('Libby (Montana USA)','Libby',-115.570900,48.377600,'USA','Montana',' US-MT ',' Kootenai River ',43.0,NULL,NULL,'','',true), + ('Livingston (Montana USA)','Livingston',-110.568050,45.673110,'USA','Montana',' US-MT ',' Gallitin River ',59.7,NULL,NULL,'','',true), + ('Malta (Montana USA)','Malta',-107.861230,48.400280,'USA','Montana',' US-MT ',' Nelson Reservoir ',24.9,NULL,NULL,'','',true), + ('Miles City (Montana USA)','Miles City',-105.789340,46.389000,'USA','Montana',' US-MT ',' Tongue River ',117.6,NULL,NULL,'','',true), + ('Missoula (Montana USA)','Missoula',-113.978910,46.902670,'USA','Montana',' US-MT ',' Bitterroot River ',47.0,NULL,NULL,'','',true), + ('Red Lodge (Montana USA)','Red Lodge',-109.267910,45.153250,'USA','Montana',' US-MT ',' Clarks Fork Yellowstone River ',13.2,NULL,NULL,'','',true), + ('Shelby (Montana USA)','Shelby',-111.760130,48.495450,'USA','Montana',' US-MT ',' Tiber Reservoir ',38.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Sidney (Montana USA)','Sidney',-104.172840,47.715800,'USA','Montana',' US-MT ',' Medicine Lake ',85.7,NULL,NULL,'','',true), + ('Wolf Point (Montana USA)','Wolf Point',-105.612810,48.119070,'USA','Montana',' US-MT ',' Walker Lake ',32.1,NULL,NULL,'','',true), + ('Alliance (Nebraska USA)','Alliance',-102.861230,42.113320,'USA','Nebraska',' US-NE ',' Lodgepole Creek ',120.6,NULL,NULL,'','',true), + ('Beatrice (Nebraska USA)','Beatrice',-96.743440,40.246300,'USA','Nebraska',' US-NE ',' Tuttle Creek Lake ',89.7,NULL,NULL,'','',true), + ('Broken Bow (Nebraska USA)','Broken Bow',-99.657860,41.414480,'USA','Nebraska',' US-NE ',' South Loup River ',18.7,NULL,NULL,'','',true), + ('Chadron (Nebraska USA)','Chadron',-102.991030,42.805940,'USA','Nebraska',' US-NE ',' White River ',102.0,NULL,NULL,'','',true), + ('Falls City (Nebraska USA)','Falls City',-95.594620,40.058070,'USA','Nebraska',' US-NE ',' Nodaway River ',53.7,NULL,NULL,'','',true), + ('Fremont (Nebraska USA)','Fremont',-96.504530,41.450760,'USA','Nebraska',' US-NE ',' Platte ',71.3,NULL,NULL,'','',true), + ('Grand Island (Nebraska USA)','Grand Island',-98.329580,40.926340,'USA','Nebraska',' US-NE ',' Loup River ',65.5,NULL,NULL,'','',true), + ('Hastings (Nebraska USA)','Hastings',-98.399970,40.597700,'USA','Nebraska',' US-NE ',' Little Blue River ',59.7,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Holdrege (Nebraska USA)','Holdrege',-99.361940,40.445990,'USA','Nebraska',' US-NE ',' Harlan County Reservoir ',42.8,NULL,NULL,'','',true), + ('Kearney (Nebraska USA)','Kearney',-99.132820,40.739170,'USA','Nebraska',' US-NE ',' South Loup River ',76.0,NULL,NULL,'','',true), + ('Kimball (Nebraska USA)','Kimball',-103.665730,41.212150,'USA','Nebraska',' US-NE ',' Lodgepole Creek ',0.3,NULL,NULL,'','',true), + ('Lincoln (Nebraska USA)','Lincoln',-96.680270,40.788660,'USA','Nebraska',' US-NE ',' Platte ',64.3,NULL,NULL,'','',true), + ('McCook (Nebraska USA)','McCook',-100.624990,40.245880,'USA','Nebraska',' US-NE ',' S Fork Republican ',95.4,NULL,NULL,'','',true), + ('Nebraska City (Nebraska USA)','Nebraska City',-95.885990,40.706680,'USA','Nebraska',' US-NE ',' Nishnabotna River ',23.6,NULL,NULL,'','',true), + ('Norfolk (Nebraska USA)','Norfolk',-97.425000,42.034480,'USA','Nebraska',' US-NE ',' Elk Horn River ',19.1,NULL,NULL,'','',true), + ('North Platte (Nebraska USA)','North Platte',-100.763540,41.153930,'USA','Nebraska',' US-NE ',' South Loup River ',87.4,NULL,NULL,'','',true), + ('Ogallala (Nebraska USA)','Ogallala',-101.673020,41.076530,'USA','Nebraska',' US-NE ',' Lake CW McConaughy ',24.2,NULL,NULL,'','',true), + ('Omaha (Nebraska USA)','Omaha',-95.988430,41.322380,'USA','Nebraska',' US-NE ',' West Nishnabotna River ',47.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('ONeill (Nebraska USA)','ONeill',-98.648370,42.473690,'USA','Nebraska',' US-NE ',' Elk Horn River ',95.3,NULL,NULL,'','',true), + ('Scottsbluff (Nebraska USA)','Scottsbluff',-103.650120,41.889160,'USA','Nebraska',' US-NE ',' Lodgepole Creek ',75.3,NULL,NULL,'','',true), + ('Valentine (Nebraska USA)','Valentine',-100.564680,42.881330,'USA','Nebraska',' US-NE ',' Niobrara River ',47.8,NULL,NULL,'','',true), + ('Carson City (Nevada USA)','Carson City',-119.763470,39.184750,'USA','Nevada',' US-NV ',' Lake Tahoe ',23.6,NULL,NULL,'','',true), + ('Elko (Nevada USA)','Elko',-115.747130,40.884990,'USA','Nevada',' US-NV ',' Humboldt ',102.2,NULL,NULL,'','',true), + ('Ely (Nevada USA)','Ely',-114.908010,39.254850,'USA','Nevada',' US-NV ',' Meadow Valley Wash ',202.1,NULL,NULL,'','',true), + ('Fallon (Nevada USA)','Fallon',-118.783060,39.470260,'USA','Nevada',' US-NV ',' Pyramid Lake ',92.0,NULL,NULL,'','',true), + ('Henderson (Nevada USA)','Henderson',-114.932120,35.993300,'USA','Nevada',' US-NV ',' Lake Mohave ',63.2,NULL,NULL,'','',true), + ('Las Vegas (Nevada USA)','Las Vegas',-115.131320,36.193990,'USA','Nevada',' US-NV ',' Lake Mead ',82.5,NULL,NULL,'','',true), + ('Reno (Nevada USA)','Reno',-119.791540,39.536450,'USA','Nevada',' US-NV ',' Lake Tahoe ',51.6,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Tonopah (Nevada USA)','Tonopah',-117.186910,38.047650,'USA','Nevada',' US-NV ',' Owens River ',137.9,NULL,NULL,'','',true), + ('Wells (Nevada USA)','Wells',-114.902780,41.154980,'USA','Nevada',' US-NV ',' Bruneau River ',135.3,NULL,NULL,'','',true), + ('Winnemucca (Nevada USA)','Winnemucca',-117.725060,40.922400,'USA','Nevada',' US-NV ',' Rye Patch Reservoir ',57.7,NULL,NULL,'','',true), + ('Berlin (New Hampshire USA)','Berlin',-71.193240,44.464700,'USA','New Hampshire',' US-NH ',' Rapid River ',39.6,NULL,NULL,'','',true), + ('Concord (New Hampshire USA)','Concord',-71.558970,43.195560,'USA','New Hampshire',' US-NH ',' Merrimack ',11.8,NULL,NULL,'','',true), + ('Manchester (New Hampshire USA)','Manchester',-71.449120,42.982330,'USA','New Hampshire',' US-NH ',' Merrimack ',30.8,NULL,NULL,'','',true), + ('Portsmouth (New Hampshire USA)','Portsmouth',-70.770180,43.085900,'USA','New Hampshire',' US-NH ',' Merrimack ',57.8,NULL,NULL,'','',true), + ('Atlantic City (New Jersey USA)','Atlantic City',-74.452190,39.366130,'USA','New Jersey',' US-NJ ',' Schuylkill River ',126.8,NULL,NULL,'','',true), + ('Newark (New Jersey USA)','Newark',-74.232220,40.728310,'USA','New Jersey',' US-NJ ',' Delaware ',94.9,NULL,NULL,'','',true), + ('Paterson (New Jersey USA)','Paterson',-74.184770,40.921940,'USA','New Jersey',' US-NJ ',' Delaware ',84.7,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Trenton (New Jersey USA)','Trenton',-74.752010,40.238460,'USA','New Jersey',' US-NJ ',' Schuylkill River ',66.2,NULL,NULL,'','',true), + ('Vineland (New Jersey USA)','Vineland',-75.015280,39.461080,'USA','New Jersey',' US-NJ ',' Schuylkill River ',88.5,NULL,NULL,'','',true), + ('Alamagordo (New Mexico USA)','Alamagordo',-105.958110,32.876420,'USA','New Mexico',' US-NM ',' Elephant Butte Reservoir ',121.6,NULL,NULL,'','',true), + ('Albuquerque (New Mexico USA)','Albuquerque',-106.624440,35.118040,'USA','New Mexico',' US-NM ',' Arroyo Chico ',48.3,NULL,NULL,'','',true), + ('Artesia (New Mexico USA)','Artesia',-104.400850,32.840590,'USA','New Mexico',' US-NM ',' Brantley Lake ',18.6,NULL,NULL,'','',true), + ('Carlsbad (New Mexico USA)','Carlsbad',-104.214570,32.392880,'USA','New Mexico',' US-NM ',' Brantley Lake ',34.4,NULL,NULL,'','',true), + ('Carrizozo (New Mexico USA)','Carrizozo',-105.851130,33.656480,'USA','New Mexico',' US-NM ',' Elephant Butte Reservoir ',129.8,NULL,NULL,'','',true), + ('Clayton (New Mexico USA)','Clayton',-103.175840,36.448280,'USA','New Mexico',' US-NM ',' Corrumpa Creek ',29.8,NULL,NULL,'','',true), + ('Clovis (New Mexico USA)','Clovis',-103.201610,34.383660,'USA','New Mexico',' US-NM ',' Ute Reservoir ',113.4,NULL,NULL,'','',true), + ('Deming (New Mexico USA)','Deming',-107.726550,32.242780,'USA','New Mexico',' US-NM ',' Caballo Reservoir ',97.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Farmington (New Mexico USA)','Farmington',-108.172300,36.759390,'USA','New Mexico',' US-NM ',' Chaco River ',49.4,NULL,NULL,'','',true), + ('Fort Sumner (New Mexico USA)','Fort Sumner',-104.264820,34.463490,'USA','New Mexico',' US-NM ',' Conchas Lake ',109.8,NULL,NULL,'','',true), + ('Gallup (New Mexico USA)','Gallup',-108.742070,35.513880,'USA','New Mexico',' US-NM ',' Puerco River ',37.4,NULL,NULL,'','',true), + ('Grants (New Mexico USA)','Grants',-107.846900,35.123800,'USA','New Mexico',' US-NM ',' Rio San Jose ',52.2,NULL,NULL,'','',true), + ('Hobbs (New Mexico USA)','Hobbs',-103.159780,32.698640,'USA','New Mexico',' US-NM ',' Pecos ',41.3,NULL,NULL,'','',true), + ('Las Cruces (New Mexico USA)','Las Cruces',-106.782190,32.326900,'USA','New Mexico',' US-NM ',' Caballo Reservoir ',92.8,NULL,NULL,'','',true), + ('Las Vegas (New Mexico USA)','Las Vegas',-105.242210,35.666340,'USA','New Mexico',' US-NM ',' Carrizo Creek ',72.1,NULL,NULL,'','',true), + ('Lordsburg (New Mexico USA)','Lordsburg',-108.696400,32.363980,'USA','New Mexico',' US-NM ',' San Simon Creek ',63.0,NULL,NULL,'','',true), + ('Los Alamos (New Mexico USA)','Los Alamos',-106.272970,35.912780,'USA','New Mexico',' US-NM ',' Rio Chama ',49.5,NULL,NULL,'','',true), + ('Raton (New Mexico USA)','Raton',-104.453420,36.886110,'USA','New Mexico',' US-NM ',' Canadian River ',21.3,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Roswell (New Mexico USA)','Roswell',-104.517290,33.396260,'USA','New Mexico',' US-NM ',' Brantley Lake ',80.7,NULL,NULL,'','',true), + ('Santa Fe (New Mexico USA)','Santa Fe',-105.959330,35.674420,'USA','New Mexico',' US-NM ',' Rio Chama ',86.3,NULL,NULL,'','',true), + ('Santa Rosa (New Mexico USA)','Santa Rosa',-104.724800,34.888520,'USA','New Mexico',' US-NM ',' Conchas Lake ',77.4,NULL,NULL,'','',true), + ('Silver City (New Mexico USA)','Silver City',-108.248500,32.790380,'USA','New Mexico',' US-NM ',' Caballo Reservoir ',93.7,NULL,NULL,'','',true), + ('Socorro (New Mexico USA)','Socorro',-106.993410,34.031830,'USA','New Mexico',' US-NM ',' Rio Puerco ',71.4,NULL,NULL,'','',true), + ('Springer (New Mexico USA)','Springer',-104.563640,36.336240,'USA','New Mexico',' US-NM ',' Canadian River ',41.2,NULL,NULL,'','',true), + ('Taos (New Mexico USA)','Taos',-105.566230,36.406640,'USA','New Mexico',' US-NM ',' Rio Chama ',82.7,NULL,NULL,'','',true), + ('Truth or Consequences (New Mexico USA)','Truth or Consequences',-107.278040,33.103080,'USA','New Mexico',' US-NM ',' Caballo Reservoir ',6.8,NULL,NULL,'','',true), + ('Tucumcari (New Mexico USA)','Tucumcari',-103.585120,35.238380,'USA','New Mexico',' US-NM ',' Ute Reservoir ',17.4,NULL,NULL,'','',true), + ('Albany (New York USA)','Albany',-73.781920,42.674020,'USA','New York',' US-NY ',' Hudson ',26.5,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Auburn (New York USA)','Auburn',-76.430310,42.966180,'USA','New York',' US-NY ',' Skaneateles Lake ',10.7,NULL,NULL,'','',true), + ('Binghamton (New York USA)','Binghamton',-75.905900,42.143290,'USA','New York',' US-NY ',' Chemung River ',70.9,NULL,NULL,'','',true), + ('Buffalo (New York USA)','Buffalo',-78.762690,42.879140,'USA','New York',' US-NY ',' Tonawanda Creek Erie Canal ',21.1,NULL,NULL,'','',true), + ('Elmira (New York USA)','Elmira',-76.777470,42.097360,'USA','New York',' US-NY ',' Chemung River ',3.6,NULL,NULL,'','',true), + ('Ithaca (New York USA)','Ithaca',-76.504050,42.437170,'USA','New York',' US-NY ',' Cayuga Lake ',30.3,NULL,NULL,'','',true), + ('Jamestown (New York USA)','Jamestown',-79.231870,42.077890,'USA','New York',' US-NY ',' Chautauqua Lake ',16.3,NULL,NULL,'','',true), + ('New York (New York USA)','New York',-73.956050,40.648660,'USA','New York',' US-NY ',' Delaware ',118.2,NULL,NULL,'','',true), + ('Newburgh (New York USA)','Newburgh',-74.025760,41.483460,'USA','New York',' US-NY ',' Housatonic River ',76.5,NULL,NULL,'','',true), + ('Niagara Falls (New York USA)','Niagara Falls',-78.959430,43.109030,'USA','New York',' US-NY ',' Niagara ',10.3,NULL,NULL,'','',true), + ('Ogdensburg (New York USA)','Ogdensburg',-75.460170,44.686490,'USA','New York',' US-NY ',' Saint Lawrence ',34.3,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Plattsburgh (New York USA)','Plattsburgh',-73.523550,44.610780,'USA','New York',' US-NY ',' Lake Champlain ',16.9,NULL,NULL,'','',true), + ('Rochester (New York USA)','Rochester',-77.623070,43.177520,'USA','New York',' US-NY ',' Erie Canal ',24.0,NULL,NULL,'','',true), + ('Rome (New York USA)','Rome',-75.454740,43.212020,'USA','New York',' US-NY ',' Oneida Lake ',34.7,NULL,NULL,'','',true), + ('Saranac Lake (New York USA)','Saranac Lake',-74.140960,44.315980,'USA','New York',' US-NY ',' Raquette River ',45.1,NULL,NULL,'','',true), + ('Saratoga Springs (New York USA)','Saratoga Springs',-73.662700,43.136030,'USA','New York',' US-NY ',' Hudson ',30.8,NULL,NULL,'','',true), + ('Schenectady (New York USA)','Schenectady',-73.907460,42.818700,'USA','New York',' US-NY ',' Hudson ',10.0,NULL,NULL,'','',true), + ('Syracuse (New York USA)','Syracuse',-76.115420,43.069100,'USA','New York',' US-NY ',' Oneida River Erie Canal ',21.6,NULL,NULL,'','',true), + ('Troy (New York USA)','Troy',-73.645370,42.733190,'USA','New York',' US-NY ',' Hudson ',26.3,NULL,NULL,'','',true), + ('Utica (New York USA)','Utica',-75.270680,43.053410,'USA','New York',' US-NY ',' West Canada Creek ',42.5,NULL,NULL,'','',true), + ('Watertown (New York USA)','Watertown',-75.894230,43.976430,'USA','New York',' US-NY ',' Oneida Lake ',84.3,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Asheville (North Carolina USA)','Asheville',-82.542210,35.602170,'USA','North Carolina',' US-NC ',' French Broad River ',51.3,NULL,NULL,'','',true), + ('Charlotte (North Carolina USA)','Charlotte',-80.835590,35.238290,'USA','North Carolina',' US-NC ',' Lake Wylie ',21.9,NULL,NULL,'','',true), + ('Durham (North Carolina USA)','Durham',-78.866710,35.956340,'USA','North Carolina',' US-NC ',' Falls Lake Reservoir ',17.3,NULL,NULL,'','',true), + ('Elizabeth City (North Carolina USA)','Elizabeth City',-76.223510,36.313100,'USA','North Carolina',' US-NC ',' Chowan River ',60.9,NULL,NULL,'','',true), + ('Fayetteville (North Carolina USA)','Fayetteville',-78.860080,35.060330,'USA','North Carolina',' US-NC ',' Cape Fear ',39.4,NULL,NULL,'','',true), + ('Gastonia (North Carolina USA)','Gastonia',-81.203220,35.244800,'USA','North Carolina',' US-NC ',' Lake Wylie ',20.1,NULL,NULL,'','',true), + ('Goldsboro (North Carolina USA)','Goldsboro',-78.001840,35.371590,'USA','North Carolina',' US-NC ',' Neuse River ',15.7,NULL,NULL,'','',true), + ('Greensboro (North Carolina USA)','Greensboro',-79.804710,36.110880,'USA','North Carolina',' US-NC ',' Haw ',28.0,NULL,NULL,'','',true), + ('Greenville (North Carolina USA)','Greenville',-77.265150,35.577060,'USA','North Carolina',' US-NC ',' Tar River ',58.5,NULL,NULL,'','',true), + ('Hickory (North Carolina USA)','Hickory',-81.366420,35.721440,'USA','North Carolina',' US-NC ',' South River ',20.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('High Point (North Carolina USA)','High Point',-79.976960,35.954620,'USA','North Carolina',' US-NC ',' High Rock Lake ',41.9,NULL,NULL,'','',true), + ('Jacksonville (North Carolina USA)','Jacksonville',-77.408130,34.771600,'USA','North Carolina',' US-NC ',' Northeast Cape Fear River ',46.4,NULL,NULL,'','',true), + ('New Bern (North Carolina USA)','New Bern',-77.064830,35.120620,'USA','North Carolina',' US-NC ',' Lake Mattamuskeet ',89.3,NULL,NULL,'','',true), + ('Raleigh (North Carolina USA)','Raleigh',-78.637040,35.799500,'USA','North Carolina',' US-NC ',' Falls Lake Reservoir ',27.4,NULL,NULL,'','',true), + ('Rocky Mount (North Carolina USA)','Rocky Mount',-77.813750,35.936660,'USA','North Carolina',' US-NC ',' Tar River ',5.6,NULL,NULL,'','',true), + ('Wilmington (North Carolina USA)','Wilmington',-77.930200,34.218610,'USA','North Carolina',' US-NC ',' Northeast Cape Fear River ',47.8,NULL,NULL,'','',true), + ('Winston Salem (North Carolina USA)','Winston Salem',-80.262170,36.098060,'USA','North Carolina',' US-NC ',' High Rock Lake ',48.2,NULL,NULL,'','',true), + ('Bismarck (North Dakota USA)','Bismarck',-100.786330,46.805570,'USA','North Dakota',' US-ND ',' Heart River ',71.5,NULL,NULL,'','',true), + ('Bottineau (North Dakota USA)','Bottineau',-100.410630,48.822440,'USA','North Dakota',' US-ND ',' Souris River ',93.1,NULL,NULL,'','',true), + ('Bowman (North Dakota USA)','Bowman',-103.412630,46.180020,'USA','North Dakota',' US-ND ',' Little Missouri River ',46.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Carrington (North Dakota USA)','Carrington',-99.115160,47.449910,'USA','North Dakota',' US-ND ',' Sheyenne River ',53.0,NULL,NULL,'','',true), + ('Devils Lake (North Dakota USA)','Devils Lake',-98.860890,48.148850,'USA','North Dakota',' US-ND ',' Sweetwater Lake ',8.4,NULL,NULL,'','',true), + ('Dickinson (North Dakota USA)','Dickinson',-102.725440,46.873090,'USA','North Dakota',' US-ND ',' Lake Tschida ',69.9,NULL,NULL,'','',true), + ('Ellendale (North Dakota USA)','Ellendale',-98.573510,46.014590,'USA','North Dakota',' US-ND ',' James ',44.7,NULL,NULL,'','',true), + ('Fargo (North Dakota USA)','Fargo',-96.810420,46.874900,'USA','North Dakota',' US-ND ',' Otter Tail Creek ',83.4,NULL,NULL,'','',true), + ('Garrison (North Dakota USA)','Garrison',-101.375450,47.662900,'USA','North Dakota',' US-ND ',' Lake Sakakawea ',76.3,NULL,NULL,'','',true), + ('Grafton (North Dakota USA)','Grafton',-97.431410,48.461190,'USA','North Dakota',' US-ND ',' Pigeon Lake ',90.9,NULL,NULL,'','',true), + ('Grand Forks (North Dakota USA)','Grand Forks',-97.091090,47.911220,'USA','North Dakota',' US-ND ',' Red Lake River ',61.1,NULL,NULL,'','',true), + ('Harvey (North Dakota USA)','Harvey',-99.896180,47.764820,'USA','North Dakota',' US-ND ',' Devils Lake ',76.9,NULL,NULL,'','',true), + ('Jamestown (North Dakota USA)','Jamestown',-98.690940,46.919820,'USA','North Dakota',' US-ND ',' Sheyenne River ',45.6,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Mandan (North Dakota USA)','Mandan',-100.911610,46.809360,'USA','North Dakota',' US-ND ',' Heart River ',62.2,NULL,NULL,'','',true), + ('Minot (North Dakota USA)','Minot',-101.261500,48.256630,'USA','North Dakota',' US-ND ',' Souris River ',87.0,NULL,NULL,'','',true), + ('Rugby (North Dakota USA)','Rugby',-99.987950,48.392360,'USA','North Dakota',' US-ND ',' Devils Lake ',85.6,NULL,NULL,'','',true), + ('Wahpeton (North Dakota USA)','Wahpeton',-96.661270,46.252840,'USA','North Dakota',' US-ND ',' Otter Tail Creek ',61.3,NULL,NULL,'','',true), + ('Williston (North Dakota USA)','Williston',-103.640630,48.165640,'USA','North Dakota',' US-ND ',' Medicine Lake ',64.9,NULL,NULL,'','',true), + ('Akron (Ohio USA)','Akron',-81.535950,41.093240,'USA','Ohio',' US-OH ',' Cuyahoga River ',26.8,NULL,NULL,'','',true), + ('Ashtabula (Ohio USA)','Ashtabula',-80.818920,41.846990,'USA','Ohio',' US-OH ',' Pymatuning Reservoir ',37.8,NULL,NULL,'','',true), + ('Canton (Ohio USA)','Canton',-81.340930,40.812080,'USA','Ohio',' US-OH ',' Tuscarawas ',18.9,NULL,NULL,'','',true), + ('Chillicothe (Ohio USA)','Chillicothe',-82.993310,39.321490,'USA','Ohio',' US-OH ',' Scioto ',51.0,NULL,NULL,'','',true), + ('Cincinnati (Ohio USA)','Cincinnati',-84.526290,39.122200,'USA','Ohio',' US-OH ',' Ohio ',52.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Cleveland (Ohio USA)','Cleveland',-81.576380,41.492260,'USA','Ohio',' US-OH ',' Cuyahoga River ',18.6,NULL,NULL,'','',true), + ('Columbus (Ohio USA)','Columbus',-82.981830,39.972380,'USA','Ohio',' US-OH ',' Scioto ',28.8,NULL,NULL,'','',true), + ('Dayton (Ohio USA)','Dayton',-84.126090,39.764030,'USA','Ohio',' US-OH ',' Great Miami River ',16.9,NULL,NULL,'','',true), + ('Findlay (Ohio USA)','Findlay',-83.609800,41.055410,'USA','Ohio',' US-OH ',' Sandusky River ',34.6,NULL,NULL,'','',true), + ('Hamilton (Ohio USA)','Hamilton',-84.529630,39.392720,'USA','Ohio',' US-OH ',' Brookville Lake ',42.4,NULL,NULL,'','',true), + ('Lancaster (Ohio USA)','Lancaster',-82.604860,39.709630,'USA','Ohio',' US-OH ',' Scioto ',48.9,NULL,NULL,'','',true), + ('Lima (Ohio USA)','Lima',-84.109880,40.740130,'USA','Ohio',' US-OH ',' Grand Lake Saint Marys ',39.6,NULL,NULL,'','',true), + ('Mansfield (Ohio USA)','Mansfield',-82.512360,40.753820,'USA','Ohio',' US-OH ',' Black Fork Mohican River ',7.6,NULL,NULL,'','',true), + ('Marion (Ohio USA)','Marion',-83.146570,40.591090,'USA','Ohio',' US-OH ',' Sandusky River ',55.1,NULL,NULL,'','',true), + ('Portsmouth (Ohio USA)','Portsmouth',-82.966800,38.790740,'USA','Ohio',' US-OH ',' Licking River ',88.7,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Springfield (Ohio USA)','Springfield',-83.784740,39.951600,'USA','Ohio',' US-OH ',' Great Miami River ',48.7,NULL,NULL,'','',true), + ('Toledo (Ohio USA)','Toledo',-83.515890,41.674990,'USA','Ohio',' US-OH ',' Maumee River ',55.3,NULL,NULL,'','',true), + ('Youngstown (Ohio USA)','Youngstown',-80.642290,41.088010,'USA','Ohio',' US-OH ',' Shenango River ',24.2,NULL,NULL,'','',true), + ('Ada (Oklahoma USA)','Ada',-96.588150,34.785300,'USA','Oklahoma',' US-OK ',' Lake Texoma ',97.4,NULL,NULL,'','',true), + ('Altus (Oklahoma USA)','Altus',-99.329170,34.634670,'USA','Oklahoma',' US-OK ',' North Fork Red River ',45.4,NULL,NULL,'','',true), + ('Alva (Oklahoma USA)','Alva',-98.668980,36.797990,'USA','Oklahoma',' US-OK ',' Medicine Lodge River ',41.4,NULL,NULL,'','',true), + ('Ardmore (Oklahoma USA)','Ardmore',-97.113960,34.177240,'USA','Oklahoma',' US-OK ',' Lake Texoma ',46.1,NULL,NULL,'','',true), + ('Bartlesville (Oklahoma USA)','Bartlesville',-96.013620,36.742340,'USA','Oklahoma',' US-OK ',' Verdigris River ',32.9,NULL,NULL,'','',true), + ('Durant (Oklahoma USA)','Durant',-96.355070,34.010240,'USA','Oklahoma',' US-OK ',' Lake Texoma ',35.7,NULL,NULL,'','',true), + ('Enid (Oklahoma USA)','Enid',-97.886250,36.399130,'USA','Oklahoma',' US-OK ',' Salt Fork Arkansas River ',42.1,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Guymon (Oklahoma USA)','Guymon',-101.464230,36.678110,'USA','Oklahoma',' US-OK ',' Optima Lake ',25.6,NULL,NULL,'','',true), + ('Idabel (Oklahoma USA)','Idabel',-94.795290,33.876940,'USA','Oklahoma',' US-OK ',' Broken Bow Lake ',43.1,NULL,NULL,'','',true), + ('Lawton (Oklahoma USA)','Lawton',-98.442300,34.603140,'USA','Oklahoma',' US-OK ',' Waurika Lake ',44.8,NULL,NULL,'','',true), + ('McAlester (Oklahoma USA)','McAlester',-95.730630,34.922860,'USA','Oklahoma',' US-OK ',' Eufaula Lake ',39.6,NULL,NULL,'','',true), + ('Miami (Oklahoma USA)','Miami',-94.904640,36.871640,'USA','Oklahoma',' US-OK ',' Big Sandy River ',20.6,NULL,NULL,'','',true), + ('Muskogee (Oklahoma USA)','Muskogee',-95.324620,35.744500,'USA','Oklahoma',' US-OK ',' Fort Gibson Lake ',25.3,NULL,NULL,'','',true), + ('Norman (Oklahoma USA)','Norman',-97.386290,35.276040,'USA','Oklahoma',' US-OK ',' North Canadian River ',42.0,NULL,NULL,'','',true), + ('Oklahoma City (Oklahoma USA)','Oklahoma City',-97.504300,35.516440,'USA','Oklahoma',' US-OK ',' North Canadian River ',17.9,NULL,NULL,'','',true), + ('Pauls Valley (Oklahoma USA)','Pauls Valley',-97.222040,34.719110,'USA','Oklahoma',' US-OK ',' Waurika Lake ',93.2,NULL,NULL,'','',true), + ('Ponca City (Oklahoma USA)','Ponca City',-97.045330,36.744160,'USA','Oklahoma',' US-OK ',' Kaw Lake ',18.1,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Shawnee (Oklahoma USA)','Shawnee',-96.949170,35.338860,'USA','Oklahoma',' US-OK ',' North Canadian River ',53.8,NULL,NULL,'','',true), + ('Stillwater (Oklahoma USA)','Stillwater',-97.070730,36.122120,'USA','Oklahoma',' US-OK ',' Arkansas ',31.3,NULL,NULL,'','',true), + ('Tulsa (Oklahoma USA)','Tulsa',-95.942570,36.149110,'USA','Oklahoma',' US-OK ',' Keystone Lake ',38.8,NULL,NULL,'','',true), + ('Woodward (Oklahoma USA)','Woodward',-99.441990,36.422720,'USA','Oklahoma',' US-OK ',' Cimarron River ',28.2,NULL,NULL,'','',true), + ('Albany (Oregon USA)','Albany',-123.140650,44.645030,'USA','Oregon',' US-OR ',' Santium River ',13.1,NULL,NULL,'','',true), + ('Ashland (Oregon USA)','Ashland',-122.723410,42.164590,'USA','Oregon',' US-OR ',' Klamath ',50.2,NULL,NULL,'','',true), + ('Astoria (Oregon USA)','Astoria',-123.782640,46.153730,'USA','Oregon',' US-OR ',' Chehalis River ',76.1,NULL,NULL,'','',true), + ('Baker City (Oregon USA)','Baker City',-117.807480,44.741190,'USA','Oregon',' US-OR ',' Malheur River ',101.6,NULL,NULL,'','',true), + ('Bend (Oregon USA)','Bend',-121.324390,44.049120,'USA','Oregon',' US-OR ',' Wickiup Reservoir ',52.0,NULL,NULL,'','',true), + ('Brookings (Oregon USA)','Brookings',-124.291080,42.081690,'USA','Oregon',' US-OR ',' Rogue ',104.7,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Burns (Oregon USA)','Burns',-119.014300,43.611100,'USA','Oregon',' US-OR ',' The Narrows ',35.2,NULL,NULL,'','',true), + ('Coos Bay (Oregon USA)','Coos Bay',-124.198100,43.347260,'USA','Oregon',' US-OR ',' Umpqua River ',51.3,NULL,NULL,'','',true), + ('Corvallis (Oregon USA)','Corvallis',-123.274680,44.575090,'USA','Oregon',' US-OR ',' Santium River ',26.0,NULL,NULL,'','',true), + ('Eugene (Oregon USA)','Eugene',-123.090860,44.026200,'USA','Oregon',' US-OR ',' Fern Ridge Reservoir ',17.4,NULL,NULL,'','',true), + ('Florence (Oregon USA)','Florence',-124.088360,43.946060,'USA','Oregon',' US-OR ',' Umpqua River ',55.4,NULL,NULL,'','',true), + ('Grants Pass (Oregon USA)','Grants Pass',-123.326940,42.428480,'USA','Oregon',' US-OR ',' Rogue ',25.8,NULL,NULL,'','',true), + ('John Day (Oregon USA)','John Day',-118.945400,44.386490,'USA','Oregon',' US-OR ',' John Day ',99.9,NULL,NULL,'','',true), + ('Klamath Falls (Oregon USA)','Klamath Falls',-121.771610,42.223000,'USA','Oregon',' US-OR ',' Upper Klamath Lake ',28.9,NULL,NULL,'','',true), + ('La Grande (Oregon USA)','La Grande',-118.211500,45.365030,'USA','Oregon',' US-OR ',' Grande Ronde River ',47.9,NULL,NULL,'','',true), + ('Lakeview (Oregon USA)','Lakeview',-120.358730,42.167790,'USA','Oregon',' US-OR ',' Goose Lake ',28.3,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('McMinnville (Oregon USA)','McMinnville',-123.215700,45.227770,'USA','Oregon',' US-OR ',' Santium River ',56.4,NULL,NULL,'','',true), + ('Medford (Oregon USA)','Medford',-122.884060,42.318230,'USA','Oregon',' US-OR ',' Rogue ',50.0,NULL,NULL,'','',true), + ('Newport (Oregon USA)','Newport',-124.008150,44.611600,'USA','Oregon',' US-OR ',' Santium River ',78.0,NULL,NULL,'','',true), + ('Ontario (Oregon USA)','Ontario',-116.997970,44.010980,'USA','Oregon',' US-OR ',' Payette River ',42.6,NULL,NULL,'','',true), + ('Pendleton (Oregon USA)','Pendleton',-118.748860,45.693400,'USA','Oregon',' US-OR ',' Grande Ronde River ',76.7,NULL,NULL,'','',true), + ('Portland (Oregon USA)','Portland',-122.646790,45.528860,'USA','Oregon',' US-OR ',' North Santium River ',83.1,NULL,NULL,'','',true), + ('Redmond (Oregon USA)','Redmond',-121.158520,44.261470,'USA','Oregon',' US-OR ',' Deschutes River ',56.2,NULL,NULL,'','',true), + ('Roseburg (Oregon USA)','Roseburg',-123.336350,43.209020,'USA','Oregon',' US-OR ',' South Umpqua River ',25.1,NULL,NULL,'','',true), + ('Salem (Oregon USA)','Salem',-123.025900,44.947630,'USA','Oregon',' US-OR ',' Santium River ',23.5,NULL,NULL,'','',true), + ('The Dalles (Oregon USA)','The Dalles',-121.229350,45.578730,'USA','Oregon',' US-OR ',' Deschutes River ',90.5,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Tillamook (Oregon USA)','Tillamook',-123.823000,45.483890,'USA','Oregon',' US-OR ',' Santium River ',103.5,NULL,NULL,'','',true), + ('Allentown (Pennsylvania USA)','Allentown',-75.481290,40.622270,'USA','Pennsylvania',' US-PA ',' Schuylkill River ',52.1,NULL,NULL,'','',true), + ('Altoona (Pennsylvania USA)','Altoona',-78.400990,40.525650,'USA','Pennsylvania',' US-PA ',' Raystown Lake ',29.5,NULL,NULL,'','',true), + ('Erie (Pennsylvania USA)','Erie',-80.063100,42.104660,'USA','Pennsylvania',' US-PA ',' French Creek ',44.4,NULL,NULL,'','',true), + ('Harrisburg (Pennsylvania USA)','Harrisburg',-76.826300,40.266820,'USA','Pennsylvania',' US-PA ',' Juniata River ',62.2,NULL,NULL,'','',true), + ('Oil City (Pennsylvania USA)','Oil City',-79.713050,41.439740,'USA','Pennsylvania',' US-PA ',' Allegheny ',38.2,NULL,NULL,'','',true), + ('Philadelphia (Pennsylvania USA)','Philadelphia',-75.167280,39.941230,'USA','Pennsylvania',' US-PA ',' Schuylkill River ',38.5,NULL,NULL,'','',true), + ('Pittsburgh (Pennsylvania USA)','Pittsburgh',-79.914400,40.447400,'USA','Pennsylvania',' US-PA ',' Kiskiminetas River ',34.3,NULL,NULL,'','',true), + ('Scranton (Pennsylvania USA)','Scranton',-75.684690,41.425550,'USA','Pennsylvania',' US-PA ',' Susquehanna ',42.4,NULL,NULL,'','',true), + ('Wilkes Barre (Pennsylvania USA)','Wilkes Barre',-75.915190,41.233210,'USA','Pennsylvania',' US-PA ',' Susquehanna ',27.1,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Williamsport (Pennsylvania USA)','Williamsport',-77.028360,41.268230,'USA','Pennsylvania',' US-PA ',' W Branch Susquehanna ',63.1,NULL,NULL,'','',true), + ('Providence (Rhode Island USA)','Providence',-71.342420,41.848460,'USA','Rhode Island',' US-RI ',' Pawcatuck River ',61.5,NULL,NULL,'','',true), + ('Aiken (South Carolina USA)','Aiken',-81.710600,33.559360,'USA','South Carolina',' US-SC ',' South Fork Edisto River ',22.6,NULL,NULL,'','',true), + ('Anderson (South Carolina USA)','Anderson',-82.621270,34.497530,'USA','South Carolina',' US-SC ',' Hartwell Lake ',28.1,NULL,NULL,'','',true), + ('Charleston (South Carolina USA)','Charleston',-79.921840,32.785880,'USA','South Carolina',' US-SC ',' Cooper ',40.3,NULL,NULL,'','',true), + ('Columbia (South Carolina USA)','Columbia',-81.034890,34.003110,'USA','South Carolina',' US-SC ',' Lake Murray ',31.0,NULL,NULL,'','',true), + ('Florence (South Carolina USA)','Florence',-79.776260,34.186570,'USA','South Carolina',' US-SC ',' Lynches River ',17.0,NULL,NULL,'','',true), + ('Georgetown (South Carolina USA)','Georgetown',-79.311220,33.383160,'USA','South Carolina',' US-SC ',' Santee ',40.2,NULL,NULL,'','',true), + ('Greenville (South Carolina USA)','Greenville',-82.431360,34.856800,'USA','South Carolina',' US-SC ',' South Saluda River ',26.9,NULL,NULL,'','',true), + ('Hilton Head Island (South Carolina USA)','Hilton Head Island',-80.760600,32.227750,'USA','South Carolina',' US-SC ',' Edisto River ',82.7,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Myrtle Beach (South Carolina USA)','Myrtle Beach',-78.914830,33.706360,'USA','South Carolina',' US-SC ',' Waccamaw River ',21.6,NULL,NULL,'','',true), + ('Spartanburg (South Carolina USA)','Spartanburg',-81.883050,34.933890,'USA','South Carolina',' US-SC ',' Broad ',22.4,NULL,NULL,'','',true), + ('Sumter (South Carolina USA)','Sumter',-80.384370,33.909750,'USA','South Carolina',' US-SC ',' Wateree River ',35.4,NULL,NULL,'','',true), + ('Aberdeen (South Dakota USA)','Aberdeen',-98.562460,45.456150,'USA','South Dakota',' US-SD ',' James ',20.5,NULL,NULL,'','',true), + ('Brookings (South Dakota USA)','Brookings',-96.826870,44.327380,'USA','South Dakota',' US-SD ',' Big Sioux River ',85.3,NULL,NULL,'','',true), + ('Chamberlain (South Dakota USA)','Chamberlain',-99.271530,43.815620,'USA','South Dakota',' US-SD ',' Lake Francis Case ',34.1,NULL,NULL,'','',true), + ('Hot Springs (South Dakota USA)','Hot Springs',-103.411230,43.439450,'USA','South Dakota',' US-SD ',' White River ',25.1,NULL,NULL,'','',true), + ('Huron (South Dakota USA)','Huron',-98.234670,44.358850,'USA','South Dakota',' US-SD ',' Lake Francis Case ',119.8,NULL,NULL,'','',true), + ('Milbank (South Dakota USA)','Milbank',-96.641750,45.220220,'USA','South Dakota',' US-SD ',' Lake Traverse ',54.2,NULL,NULL,'','',true), + ('Mitchell (South Dakota USA)','Mitchell',-98.011440,43.719030,'USA','South Dakota',' US-SD ',' Lake Francis Case ',95.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Mobridge (South Dakota USA)','Mobridge',-100.260350,45.545920,'USA','South Dakota',' US-SD ',' Lake Oahe ',28.9,NULL,NULL,'','',true), + ('Pierre (South Dakota USA)','Pierre',-100.301810,44.397110,'USA','South Dakota',' US-SD ',' Missouri ',40.8,NULL,NULL,'','',true), + ('Pine Ridge (South Dakota USA)','Pine Ridge',-102.519720,43.056770,'USA','South Dakota',' US-SD ',' Cheyenne ',97.1,NULL,NULL,'','',true), + ('Rapid City (South Dakota USA)','Rapid City',-103.182570,44.061050,'USA','South Dakota',' US-SD ',' Cheyenne ',33.6,NULL,NULL,'','',true), + ('Sioux Falls (South Dakota USA)','Sioux Falls',-96.731720,43.571240,'USA','South Dakota',' US-SD ',' Big Sioux River ',6.2,NULL,NULL,'','',true), + ('Spearfish (South Dakota USA)','Spearfish',-103.836870,44.498730,'USA','South Dakota',' US-SD ',' Belle Fourche River ',26.8,NULL,NULL,'','',true), + ('Sturgis (South Dakota USA)','Sturgis',-103.502820,44.435110,'USA','South Dakota',' US-SD ',' Belle Fourche River ',52.8,NULL,NULL,'','',true), + ('Vermillion (South Dakota USA)','Vermillion',-96.993090,42.844610,'USA','South Dakota',' US-SD ',' Grand River ',67.5,NULL,NULL,'','',true), + ('Watertown (South Dakota USA)','Watertown',-97.095990,44.889090,'USA','South Dakota',' US-SD ',' Lake Traverse ',94.4,NULL,NULL,'','',true), + ('Yankton (South Dakota USA)','Yankton',-97.405470,42.904980,'USA','South Dakota',' US-SD ',' Grand River ',86.2,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Chattanooga (Tennessee USA)','Chattanooga',-85.256770,35.052080,'USA','Tennessee',' US-TN ',' Chickamauga Lake ',24.0,NULL,NULL,'','',true), + ('Clarksville (Tennessee USA)','Clarksville',-87.306450,36.542550,'USA','Tennessee',' US-TN ',' Cheatham Lake ',33.2,NULL,NULL,'','',true), + ('Columbia (Tennessee USA)','Columbia',-87.055360,35.579280,'USA','Tennessee',' US-TN ',' Duck River ',13.2,NULL,NULL,'','',true), + ('Dyersburg (Tennessee USA)','Dyersburg',-89.376060,36.030070,'USA','Tennessee',' US-TN ',' Obion River ',11.8,NULL,NULL,'','',true), + ('Jackson (Tennessee USA)','Jackson',-88.828120,35.605890,'USA','Tennessee',' US-TN ',' South Fork Forked Deer River ',39.0,NULL,NULL,'','',true), + ('Johnson City (Tennessee USA)','Johnson City',-82.397020,36.299860,'USA','Tennessee',' US-TN ',' South Fork Holston River ',26.4,NULL,NULL,'','',true), + ('Kingsport (Tennessee USA)','Kingsport',-82.532200,36.544230,'USA','Tennessee',' US-TN ',' South Fork Holston River ',20.5,NULL,NULL,'','',true), + ('Knoxville (Tennessee USA)','Knoxville',-83.934070,35.980190,'USA','Tennessee',' US-TN ',' Fort Loudoun Lake ',20.6,NULL,NULL,'','',true), + ('Memphis (Tennessee USA)','Memphis',-90.015360,35.156940,'USA','Tennessee',' US-TN ',' Arkabutla Lake ',44.4,NULL,NULL,'','',true), + ('Murfreesboro (Tennessee USA)','Murfreesboro',-86.383190,35.858800,'USA','Tennessee',' US-TN ',' J Percy Priest Lake ',28.5,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Nashville (Tennessee USA)','Nashville',-86.752370,36.118200,'USA','Tennessee',' US-TN ',' J Percy Priest Lake ',18.8,NULL,NULL,'','',true), + ('Oak Ridge (Tennessee USA)','Oak Ridge',-84.259110,36.009180,'USA','Tennessee',' US-TN ',' Fort Loudoun Lake ',24.9,NULL,NULL,'','',true), + ('Paris (Tennessee USA)','Paris',-88.311090,36.313160,'USA','Tennessee',' US-TN ',' Kentucky Lake ',24.0,NULL,NULL,'','',true), + ('Abilene (Texas USA)','Abilene',-99.734900,32.426430,'USA','Texas',' US-TX ',' Clear Fork Brazos River ',48.0,NULL,NULL,'','',true), + ('Alice (Texas USA)','Alice',-98.051410,27.763390,'USA','Texas',' US-TX ',' Lake Corpus Christi ',44.4,NULL,NULL,'','',true), + ('Alpine (Texas USA)','Alpine',-103.631520,30.354080,'USA','Texas',' US-TX ',' Rio Grande ',60.0,NULL,NULL,'','',true), + ('Amarillo (Texas USA)','Amarillo',-101.819820,35.233380,'USA','Texas',' US-TX ',' Prairie Dog Town Fork Red ',45.0,NULL,NULL,'','',true), + ('Arlington (Texas USA)','Arlington',-97.045150,32.729970,'USA','Texas',' US-TX ',' Lake Joe Pool ',13.3,NULL,NULL,'','',true), + ('Austin (Texas USA)','Austin',-97.767230,30.286690,'USA','Texas',' US-TX ',' Lake Travis ',25.6,NULL,NULL,'','',true), + ('Bay City (Texas USA)','Bay City',-95.938020,28.977250,'USA','Texas',' US-TX ',' Somerville Lake ',163.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Baytown (Texas USA)','Baytown',-94.926760,29.728970,'USA','Texas',' US-TX ',' Lake Conroe ',105.3,NULL,NULL,'','',true), + ('Beaumont (Texas USA)','Beaumont',-94.100040,30.056440,'USA','Texas',' US-TX ',' B A Steinhagen Reservoir ',89.6,NULL,NULL,'','',true), + ('Beeville (Texas USA)','Beeville',-97.762420,28.370920,'USA','Texas',' US-TX ',' Lake Corpus Christi ',29.3,NULL,NULL,'','',true), + ('Big Spring (Texas USA)','Big Spring',-101.459820,32.257440,'USA','Texas',' US-TX ',' Double Mountain Fork Brazos ',107.6,NULL,NULL,'','',true), + ('Borger (Texas USA)','Borger',-101.458420,35.621750,'USA','Texas',' US-TX ',' Lake Meredith ',19.1,NULL,NULL,'','',true), + ('Brownfield (Texas USA)','Brownfield',-102.286460,33.168680,'USA','Texas',' US-TX ',' Double Mountain Fork Brazos ',124.1,NULL,NULL,'','',true), + ('Brownsville (Texas USA)','Brownsville',-97.488690,25.946410,'USA','Texas',' US-TX ',' Laguna El Barril ',38.8,NULL,NULL,'','',true), + ('Brownwood (Texas USA)','Brownwood',-99.014140,31.673730,'USA','Texas',' US-TX ',' Trinity River ',84.8,NULL,NULL,'','',true), + ('Bryan (Texas USA)','Bryan',-96.364200,30.676990,'USA','Texas',' US-TX ',' Navasota River ',38.7,NULL,NULL,'','',true), + ('Childress (Texas USA)','Childress',-100.130900,34.412880,'USA','Texas',' US-TX ',' North Wichita River ',67.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Cleburne (Texas USA)','Cleburne',-97.373180,32.344010,'USA','Texas',' US-TX ',' Lake Whitney ',42.2,NULL,NULL,'','',true), + ('Corpus Christi (Texas USA)','Corpus Christi',-97.427030,27.757030,'USA','Texas',' US-TX ',' Lake Corpus Christi ',64.6,NULL,NULL,'','',true), + ('Corsicana (Texas USA)','Corsicana',-96.442390,32.111130,'USA','Texas',' US-TX ',' Navarro Mills Lake ',35.8,NULL,NULL,'','',true), + ('Dalhart (Texas USA)','Dalhart',-102.474310,36.088630,'USA','Texas',' US-TX ',' Rita Blanca Creek ',14.4,NULL,NULL,'','',true), + ('Dallas (Texas USA)','Dallas',-96.753840,32.800110,'USA','Texas',' US-TX ',' Lake Ray Hubbard ',25.6,NULL,NULL,'','',true), + ('Del Rio (Texas USA)','Del Rio',-100.894940,29.353200,'USA','Texas',' US-TX ',' Amistad Reservoir ',29.9,NULL,NULL,'','',true), + ('Denton (Texas USA)','Denton',-97.079880,33.175730,'USA','Texas',' US-TX ',' Lewisville Lake ',9.4,NULL,NULL,'','',true), + ('Eagle Pass (Texas USA)','Eagle Pass',-100.459700,28.722450,'USA','Texas',' US-TX ',' San Rodrigo ',78.0,NULL,NULL,'','',true), + ('El Paso (Texas USA)','El Paso',-106.411230,31.780570,'USA','Texas',' US-TX ',' Laguna Santa Mara ',109.2,NULL,NULL,'','',true), + ('Fort Stockton (Texas USA)','Fort Stockton',-102.857070,30.878150,'USA','Texas',' US-TX ',' Rio Grande ',36.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Fort Worth (Texas USA)','Fort Worth',-97.341550,32.787920,'USA','Texas',' US-TX ',' West Fork Trinity River ',22.4,NULL,NULL,'','',true), + ('Freeport (Texas USA)','Freeport',-95.387620,29.019800,'USA','Texas',' US-TX ',' Lake Conroe ',163.2,NULL,NULL,'','',true), + ('Gainesville (Texas USA)','Gainesville',-97.130820,33.583270,'USA','Texas',' US-TX ',' Ray Roberts Lake ',15.0,NULL,NULL,'','',true), + ('Galveston (Texas USA)','Galveston',-94.820690,29.283130,'USA','Texas',' US-TX ',' Lake Conroe ',152.4,NULL,NULL,'','',true), + ('Harlingen (Texas USA)','Harlingen',-97.718430,26.266590,'USA','Texas',' US-TX ',' Laguna El Barril ',81.1,NULL,NULL,'','',true), + ('Hereford (Texas USA)','Hereford',-102.381300,34.860190,'USA','Texas',' US-TX ',' Prairie Dog Town Fork Red ',69.3,NULL,NULL,'','',true), + ('Houston (Texas USA)','Houston',-95.350270,29.812190,'USA','Texas',' US-TX ',' Lake Conroe ',77.6,NULL,NULL,'','',true), + ('Huntsville (Texas USA)','Huntsville',-95.578580,30.731600,'USA','Texas',' US-TX ',' Lake Conroe ',28.4,NULL,NULL,'','',true), + ('Kerrville (Texas USA)','Kerrville',-99.174260,30.082280,'USA','Texas',' US-TX ',' North Prong Medina River ',32.2,NULL,NULL,'','',true), + ('Killeen (Texas USA)','Killeen',-97.765120,31.134190,'USA','Texas',' US-TX ',' Lampasas River ',12.3,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Kingsville (Texas USA)','Kingsville',-97.869440,27.591850,'USA','Texas',' US-TX ',' Lake Corpus Christi ',61.7,NULL,NULL,'','',true), + ('Lamesa (Texas USA)','Lamesa',-101.945980,32.742850,'USA','Texas',' US-TX ',' Double Mountain Fork Brazos ',101.9,NULL,NULL,'','',true), + ('Laredo (Texas USA)','Laredo',-99.458310,27.519220,'USA','Texas',' US-TX ',' San Juan ',79.9,NULL,NULL,'','',true), + ('Longview (Texas USA)','Longview',-94.724400,32.516490,'USA','Texas',' US-TX ',' Big Cypress Bayou ',41.1,NULL,NULL,'','',true), + ('Lubbock (Texas USA)','Lubbock',-101.843730,33.583300,'USA','Texas',' US-TX ',' Double Mountain Fork Brazos ',97.0,NULL,NULL,'','',true), + ('Lufkin (Texas USA)','Lufkin',-94.722410,31.357860,'USA','Texas',' US-TX ',' Neches River ',14.4,NULL,NULL,'','',true), + ('McAllen (Texas USA)','McAllen',-98.249030,26.186490,'USA','Texas',' US-TX ',' Presa Marte R Gomez ',74.9,NULL,NULL,'','',true), + ('Midland (Texas USA)','Midland',-102.065470,32.009670,'USA','Texas',' US-TX ',' OC Fisher Lake ',156.9,NULL,NULL,'','',true), + ('Monahans (Texas USA)','Monahans',-102.835280,31.633090,'USA','Texas',' US-TX ',' Rio Grande ',103.9,NULL,NULL,'','',true), + ('Mount Pleasant (Texas USA)','Mount Pleasant',-94.953030,33.162880,'USA','Texas',' US-TX ',' Big Cypress Creek ',9.8,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Nacogdoches (Texas USA)','Nacogdoches',-94.683900,31.679730,'USA','Texas',' US-TX ',' Angelina River ',40.8,NULL,NULL,'','',true), + ('New Braunfels (Texas USA)','New Braunfels',-98.149970,29.734490,'USA','Texas',' US-TX ',' Canyon Lake ',20.6,NULL,NULL,'','',true), + ('Odessa (Texas USA)','Odessa',-102.369750,31.867860,'USA','Texas',' US-TX ',' Pecos ',146.1,NULL,NULL,'','',true), + ('Palestine (Texas USA)','Palestine',-95.614100,31.756120,'USA','Texas',' US-TX ',' Cedar Creek Reservoir ',80.4,NULL,NULL,'','',true), + ('Pampa (Texas USA)','Pampa',-100.946320,35.515460,'USA','Texas',' US-TX ',' Canadian ',28.7,NULL,NULL,'','',true), + ('Paris (Texas USA)','Paris',-95.564590,33.662920,'USA','Texas',' US-TX ',' Pat Mayse Lake ',19.1,NULL,NULL,'','',true), + ('Pecos (Texas USA)','Pecos',-103.457170,31.414360,'USA','Texas',' US-TX ',' Red Bluff Lake ',76.0,NULL,NULL,'','',true), + ('Perryton (Texas USA)','Perryton',-100.793510,36.397280,'USA','Texas',' US-TX ',' Optima Lake ',46.3,NULL,NULL,'','',true), + ('Plainview (Texas USA)','Plainview',-101.679350,34.222330,'USA','Texas',' US-TX ',' Prairie Dog Town Fork Red ',71.4,NULL,NULL,'','',true), + ('Port Arthur (Texas USA)','Port Arthur',-93.938030,29.922390,'USA','Texas',' US-TX ',' B A Steinhagen Reservoir ',106.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Port Lavaca (Texas USA)','Port Lavaca',-96.646750,28.614530,'USA','Texas',' US-TX ',' San Antonio River ',98.5,NULL,NULL,'','',true), + ('Presidio (Texas USA)','Presidio',-104.362320,29.600140,'USA','Texas',' US-TX ',' Presa Luis L Len (El Granero) ',118.5,NULL,NULL,'','',true), + ('San Angelo (Texas USA)','San Angelo',-100.427440,31.460720,'USA','Texas',' US-TX ',' OC Fisher Lake ',10.1,NULL,NULL,'','',true), + ('San Antonio (Texas USA)','San Antonio',-98.504470,29.410440,'USA','Texas',' US-TX ',' Medina River ',36.2,NULL,NULL,'','',true), + ('San Marcos (Texas USA)','San Marcos',-97.918060,29.959950,'USA','Texas',' US-TX ',' Canyon Lake ',34.4,NULL,NULL,'','',true), + ('Sherman (Texas USA)','Sherman',-96.560130,33.598220,'USA','Texas',' US-TX ',' Lake Texoma ',38.5,NULL,NULL,'','',true), + ('Snyder (Texas USA)','Snyder',-100.943480,32.720600,'USA','Texas',' US-TX ',' Double Mountain Fork Brazos ',45.1,NULL,NULL,'','',true), + ('Sweetwater (Texas USA)','Sweetwater',-100.362130,32.489020,'USA','Texas',' US-TX ',' Clear Fork Brazos River ',82.4,NULL,NULL,'','',true), + ('Taylor (Texas USA)','Taylor',-97.406560,30.585560,'USA','Texas',' US-TX ',' Stillhouse Hollow Lake ',51.2,NULL,NULL,'','',true), + ('Temple (Texas USA)','Temple',-97.327430,31.075760,'USA','Texas',' US-TX ',' Belton Lake ',19.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Texarkana (Texas USA)','Texarkana',-94.056490,33.430810,'USA','Texas',' US-TX ',' Sulphur River ',20.3,NULL,NULL,'','',true), + ('Tyler (Texas USA)','Tyler',-95.322610,32.357900,'USA','Texas',' US-TX ',' Lake Fork Reservoir ',65.8,NULL,NULL,'','',true), + ('Van Horn (Texas USA)','Van Horn',-104.841230,31.090920,'USA','Texas',' US-TX ',' Red Bluff Lake ',130.3,NULL,NULL,'','',true), + ('Vernon (Texas USA)','Vernon',-99.289460,34.158430,'USA','Texas',' US-TX ',' Wichita River ',51.8,NULL,NULL,'','',true), + ('Victoria (Texas USA)','Victoria',-96.999210,28.809680,'USA','Texas',' US-TX ',' San Antonio River ',61.9,NULL,NULL,'','',true), + ('Waco (Texas USA)','Waco',-97.142210,31.609140,'USA','Texas',' US-TX ',' Waco Lake ',12.5,NULL,NULL,'','',true), + ('Wichita Falls (Texas USA)','Wichita Falls',-98.506630,33.932370,'USA','Texas',' US-TX ',' Wichita River ',31.3,NULL,NULL,'','',true), + ('Zapata (Texas USA)','Zapata',-99.208980,26.934990,'USA','Texas',' US-TX ',' Falcon Lake ',15.5,NULL,NULL,'','',true), + ('Blanding (Utah USA)','Blanding',-109.476780,37.587220,'USA','Utah',' US-UT ',' Dolores River ',86.1,NULL,NULL,'','',true), + ('Brigham City (Utah USA)','Brigham City',-111.957210,41.500090,'USA','Utah',' US-UT ',' Great Salt Lake ',55.1,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Cedar City (Utah USA)','Cedar City',-113.049850,37.678640,'USA','Utah',' US-UT ',' Virgin River ',106.2,NULL,NULL,'','',true), + ('Delta (Utah USA)','Delta',-112.535740,39.331970,'USA','Utah',' US-UT ',' Sevier River ',48.5,NULL,NULL,'','',true), + ('Green River (Utah USA)','Green River',-110.177930,39.034860,'USA','Utah',' US-UT ',' Muddy Creek ',86.0,NULL,NULL,'','',true), + ('Logan (Utah USA)','Logan',-111.818520,41.732940,'USA','Utah',' US-UT ',' Bear ',30.1,NULL,NULL,'','',true), + ('Moab (Utah USA)','Moab',-109.484690,38.519640,'USA','Utah',' US-UT ',' Dolores River ',81.5,NULL,NULL,'','',true), + ('Monticello (Utah USA)','Monticello',-109.342320,37.869510,'USA','Utah',' US-UT ',' Dolores River ',59.0,NULL,NULL,'','',true), + ('Nephi (Utah USA)','Nephi',-111.898010,39.719990,'USA','Utah',' US-UT ',' San Pitch River ',36.1,NULL,NULL,'','',true), + ('Ogden (Utah USA)','Ogden',-111.942890,41.264190,'USA','Utah',' US-UT ',' Great Salt Lake ',46.6,NULL,NULL,'','',true), + ('Orem (Utah USA)','Orem',-111.754460,40.362860,'USA','Utah',' US-UT ',' Utah Lake ',18.2,NULL,NULL,'','',true), + ('Panguitch (Utah USA)','Panguitch',-112.470110,37.823600,'USA','Utah',' US-UT ',' Fremont River ',117.0,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Price (Utah USA)','Price',-110.783340,39.645770,'USA','Utah',' US-UT ',' Strawberry Reservoir ',65.7,NULL,NULL,'','',true), + ('Provo (Utah USA)','Provo',-111.655480,40.273800,'USA','Utah',' US-UT ',' Utah Lake ',14.9,NULL,NULL,'','',true), + ('Richfield (Utah USA)','Richfield',-112.059060,38.786740,'USA','Utah',' US-UT ',' Sevier River ',31.0,NULL,NULL,'','',true), + ('Salt Lake City (Utah USA)','Salt Lake City',-111.887670,40.766260,'USA','Utah',' US-UT ',' Jordan River ',11.2,NULL,NULL,'','',true), + ('St George (Utah USA)','St George',-113.606210,37.112740,'USA','Utah',' US-UT ',' Virgin River ',26.5,NULL,NULL,'','',true), + ('Vernal (Utah USA)','Vernal',-109.546510,40.430710,'USA','Utah',' US-UT ',' Green ',45.9,NULL,NULL,'','',true), + ('Wendover (Utah USA)','Wendover',-113.971620,40.701600,'USA','Utah',' US-UT ',' Great Salt Lake ',136.3,NULL,NULL,'','',true), + ('Burlington (Vermont USA)','Burlington',-73.209690,44.503300,'USA','Vermont',' US-VT ',' Lake Champlain ',11.0,NULL,NULL,'','',true), + ('Montpelier (Vermont USA)','Montpelier',-72.548920,44.251180,'USA','Vermont',' US-VT ',' Lamoille River ',52.4,NULL,NULL,'','',true), + ('Rutland (Vermont USA)','Rutland',-72.982580,43.609610,'USA','Vermont',' US-VT ',' Lake George ',45.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Alexandria (Virginia USA)','Alexandria',-77.079580,38.753650,'USA','Virginia',' US-VA ',' Rappahannock River ',58.2,NULL,NULL,'','',true), + ('Blacksburg (Virginia USA)','Blacksburg',-80.410240,37.267350,'USA','Virginia',' US-VA ',' Craig Creek ',44.4,NULL,NULL,'','',true), + ('Charlottesville (Virginia USA)','Charlottesville',-78.513530,38.056520,'USA','Virginia',' US-VA ',' Rapidan River ',48.7,NULL,NULL,'','',true), + ('Danville (Virginia USA)','Danville',-79.444310,36.587970,'USA','Virginia',' US-VA ',' Dan River ',7.0,NULL,NULL,'','',true), + ('Lynchburg (Virginia USA)','Lynchburg',-79.199550,37.370000,'USA','Virginia',' US-VA ',' Cowpasture ',45.0,NULL,NULL,'','',true), + ('Martinsville (Virginia USA)','Martinsville',-79.871670,36.699300,'USA','Virginia',' US-VA ',' Dan River ',47.1,NULL,NULL,'','',true), + ('Newport News (Virginia USA)','Newport News',-76.387420,37.038090,'USA','Virginia',' US-VA ',' Nottoway River ',74.5,NULL,NULL,'','',true), + ('Norfolk (Virginia USA)','Norfolk',-76.269910,36.858000,'USA','Virginia',' US-VA ',' Chowan River ',72.4,NULL,NULL,'','',true), + ('Petersburg (Virginia USA)','Petersburg',-77.347850,37.231180,'USA','Virginia',' US-VA ',' Nottoway River ',43.7,NULL,NULL,'','',true), + ('Richmond (Virginia USA)','Richmond',-77.448980,37.542470,'USA','Virginia',' US-VA ',' Pamunkey River ',27.4,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Roanoke (Virginia USA)','Roanoke',-79.929050,37.285940,'USA','Virginia',' US-VA ',' Smith Mountain Lake ',30.2,NULL,NULL,'','',true), + ('Staunton (Virginia USA)','Staunton',-79.074890,38.145480,'USA','Virginia',' US-VA ',' Calfpasture River ',29.5,NULL,NULL,'','',true), + ('Virginia Beach (Virginia USA)','Virginia Beach',-76.025850,36.870880,'USA','Virginia',' US-VA ',' Chowan River ',90.8,NULL,NULL,'','',true), + ('Aberdeen (Washington USA)','Aberdeen',-123.779340,46.967850,'USA','Washington',' US-WA ',' Chehalis River ',46.5,NULL,NULL,'','',true), + ('Bellingham (Washington USA)','Bellingham',-122.452070,48.764160,'USA','Washington',' US-WA ',' Judson Lake ',27.5,NULL,NULL,'','',true), + ('Bremerton (Washington USA)','Bremerton',-122.679700,47.540210,'USA','Washington',' US-WA ',' Lake Washington Ship Canal ',28.2,NULL,NULL,'','',true), + ('Centralia (Washington USA)','Centralia',-122.910200,46.685960,'USA','Washington',' US-WA ',' Chehalis River ',27.9,NULL,NULL,'','',true), + ('Chelan (Washington USA)','Chelan',-119.962730,47.830180,'USA','Washington',' US-WA ',' Lake Chelan ',42.7,NULL,NULL,'','',true), + ('Colville (Washington USA)','Colville',-117.931660,48.574590,'USA','Washington',' US-WA ',' Franklin D Roosevelt Lake ',15.3,NULL,NULL,'','',true), + ('Ellensburg (Washington USA)','Ellensburg',-120.493420,47.014650,'USA','Washington',' US-WA ',' Yakima River ',46.1,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Everett (Washington USA)','Everett',-122.193860,47.973460,'USA','Washington',' US-WA ',' Snohomish River ',6.0,NULL,NULL,'','',true), + ('Kennewick (Washington USA)','Kennewick',-119.183530,46.178050,'USA','Washington',' US-WA ',' Lower Crab Creek ',88.2,NULL,NULL,'','',true), + ('Longview (Washington USA)','Longview',-122.949960,46.148470,'USA','Washington',' US-WA ',' Cowlitz River ',57.3,NULL,NULL,'','',true), + ('Mount Vernon (Washington USA)','Mount Vernon',-122.356570,48.429230,'USA','Washington',' US-WA ',' North Fork Skagit River ',8.0,NULL,NULL,'','',true), + ('Olympia (Washington USA)','Olympia',-122.921430,47.002460,'USA','Washington',' US-WA ',' Chehalis River ',39.4,NULL,NULL,'','',true), + ('Omak (Washington USA)','Omak',-119.539870,48.424990,'USA','Washington',' US-WA ',' Okanogan River ',7.5,NULL,NULL,'','',true), + ('Port Angeles (Washington USA)','Port Angeles',-123.486470,48.110300,'USA','Washington',' US-WA ',' Quarantine Lake ',27.6,NULL,NULL,'','',true), + ('Pullman (Washington USA)','Pullman',-117.185190,46.753530,'USA','Washington',' US-WA ',' Palouse River ',24.6,NULL,NULL,'','',true), + ('Richland (Washington USA)','Richland',-119.295850,46.345820,'USA','Washington',' US-WA ',' Lower Crab Creek ',68.4,NULL,NULL,'','',true), + ('Seattle (Washington USA)','Seattle',-122.347960,47.639070,'USA','Washington',' US-WA ',' Lake Washington Ship Canal ',3.1,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Spokane (Washington USA)','Spokane',-117.429990,47.655380,'USA','Washington',' US-WA ',' Spokane River ',23.0,NULL,NULL,'','',true), + ('Tacoma (Washington USA)','Tacoma',-122.434740,47.234300,'USA','Washington',' US-WA ',' Puyallup River ',8.5,NULL,NULL,'','',true), + ('Vancouver (Washington USA)','Vancouver',-122.672040,45.674500,'USA','Washington',' US-WA ',' Cowlitz River ',92.3,NULL,NULL,'','',true), + ('Walla Walla (Washington USA)','Walla Walla',-118.336290,46.093240,'USA','Washington',' US-WA ',' Grande Ronde River ',65.5,NULL,NULL,'','',true), + ('Wenatchee (Washington USA)','Wenatchee',-120.370590,47.488080,'USA','Washington',' US-WA ',' Lake Chelan ',67.1,NULL,NULL,'','',true), + ('Yakima (Washington USA)','Yakima',-120.521500,46.571620,'USA','Washington',' US-WA ',' Yakima River ',22.7,NULL,NULL,'','',true), + ('Beckley (West Virginia USA)','Beckley',-81.158240,37.804370,'USA','West Virginia',' US-WV ',' Bluestone River ',43.6,NULL,NULL,'','',true), + ('Bluefield (West Virginia USA)','Bluefield',-81.217340,37.281370,'USA','West Virginia',' US-WV ',' Bluestone River ',14.8,NULL,NULL,'','',true), + ('Charleston (West Virginia USA)','Charleston',-81.604650,38.335450,'USA','West Virginia',' US-WV ',' Kanawha ',10.2,NULL,NULL,'','',true), + ('Clarksburg (West Virginia USA)','Clarksburg',-80.363820,39.286490,'USA','West Virginia',' US-WV ',' Buckhannon River ',33.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Huntington (West Virginia USA)','Huntington',-82.476000,38.393380,'USA','West Virginia',' US-WV ',' Kanawha ',69.4,NULL,NULL,'','',true), + ('Morgantown (West Virginia USA)','Morgantown',-79.973190,39.568510,'USA','West Virginia',' US-WV ',' Monongahela ',3.2,NULL,NULL,'','',true), + ('Parkersburg (West Virginia USA)','Parkersburg',-81.529580,39.266170,'USA','West Virginia',' US-WV ',' Little Kanawha River ',41.3,NULL,NULL,'','',true), + ('Wheeling (West Virginia USA)','Wheeling',-80.663640,40.048660,'USA','West Virginia',' US-WV ',' Monongahela ',77.3,NULL,NULL,'','',true), + ('Appleton (Wisconsin USA)','Appleton',-88.362830,44.282170,'USA','Wisconsin',' US-WI ',' Fox ',16.2,NULL,NULL,'','',true), + ('Ashland (Wisconsin USA)','Ashland',-90.861020,46.542500,'USA','Wisconsin',' US-WI ',' Pigeon River ',31.0,NULL,NULL,'','',true), + ('Eau Claire (Wisconsin USA)','Eau Claire',-91.510200,44.807050,'USA','Wisconsin',' US-WI ',' Red Cedar River ',36.8,NULL,NULL,'','',true), + ('Green Bay (Wisconsin USA)','Green Bay',-88.000020,44.486030,'USA','Wisconsin',' US-WI ',' Fox ',20.5,NULL,NULL,'','',true), + ('Janesville (Wisconsin USA)','Janesville',-89.024490,42.676360,'USA','Wisconsin',' US-WI ',' Lake Koshkonong ',22.7,NULL,NULL,'','',true), + ('La Crosse (Wisconsin USA)','La Crosse',-91.170770,43.780610,'USA','Wisconsin',' US-WI ',' Turkey Creek ',92.7,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Madison (Wisconsin USA)','Madison',-89.459830,43.045960,'USA','Wisconsin',' US-WI ',' Lake Mendota ',8.1,NULL,NULL,'','',true), + ('Manitowoc (Wisconsin USA)','Manitowoc',-87.664270,44.093670,'USA','Wisconsin',' US-WI ',' Fox ',52.0,NULL,NULL,'','',true), + ('Marinette (Wisconsin USA)','Marinette',-87.679610,45.089820,'USA','Wisconsin',' US-WI ',' Peshtigo River ',33.7,NULL,NULL,'','',true), + ('Milwaukee (Wisconsin USA)','Milwaukee',-87.940980,43.028760,'USA','Wisconsin',' US-WI ',' East Branch Rock River ',67.3,NULL,NULL,'','',true), + ('Oshkosh (Wisconsin USA)','Oshkosh',-88.550640,44.036360,'USA','Wisconsin',' US-WI ',' Lake Butte Des Morts ',8.6,NULL,NULL,'','',true), + ('Racine (Wisconsin USA)','Racine',-87.819970,42.734230,'USA','Wisconsin',' US-WI ',' Des Plaines River ',78.7,NULL,NULL,'','',true), + ('Sheboygan (Wisconsin USA)','Sheboygan',-87.795290,43.704960,'USA','Wisconsin',' US-WI ',' East Branch Rock River ',59.9,NULL,NULL,'','',true), + ('Superior (Wisconsin USA)','Superior',-92.066080,46.676050,'USA','Wisconsin',' US-WI ',' Saint Louis ',50.4,NULL,NULL,'','',true), + ('Wausau (Wisconsin USA)','Wausau',-89.630380,44.965430,'USA','Wisconsin',' US-WI ',' Lake Dubay ',28.4,NULL,NULL,'','',true), + ('West Bend (Wisconsin USA)','West Bend',-88.168950,43.419150,'USA','Wisconsin',' US-WI ',' East Branch Rock River ',26.2,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Buffalo (Wyoming USA)','Buffalo',-106.745880,44.339110,'USA','Wyoming',' US-WY ',' North Fork Powder River ',47.8,NULL,NULL,'','',true), + ('Casper (Wyoming USA)','Casper',-106.336030,42.847500,'USA','Wyoming',' US-WY ',' South Fork Powder River ',63.3,NULL,NULL,'','',true), + ('Cheyenne (Wyoming USA)','Cheyenne',-104.812430,41.114710,'USA','Wyoming',' US-WY ',' Laramie River ',81.7,NULL,NULL,'','',true), + ('Cody (Wyoming USA)','Cody',-109.015580,44.529390,'USA','Wyoming',' US-WY ',' Buffalo Bill Reservoir ',19.4,NULL,NULL,'','',true), + ('Gillette (Wyoming USA)','Gillette',-105.454970,44.320090,'USA','Wyoming',' US-WY ',' Powder River ',81.2,NULL,NULL,'','',true), + ('Green River (Wyoming USA)','Green River',-109.415870,41.516360,'USA','Wyoming',' US-WY ',' Flaming Gorge Reservoir ',47.1,NULL,NULL,'','',true), + ('Greybull (Wyoming USA)','Greybull',-108.098650,44.500740,'USA','Wyoming',' US-WY ',' Greybull River ',41.0,NULL,NULL,'','',true), + ('Jackson (Wyoming USA)','Jackson',-110.743990,43.513630,'USA','Wyoming',' US-WY ',' Palisades Reservoir ',39.7,NULL,NULL,'','',true), + ('Kemmerer (Wyoming USA)','Kemmerer',-110.524980,41.828130,'USA','Wyoming',' US-WY ',' Bear Lake ',71.6,NULL,NULL,'','',true), + ('Lander (Wyoming USA)','Lander',-108.722500,42.823100,'USA','Wyoming',' US-WY ',' Ocean Lake ',41.9,NULL,NULL,'','',true); +INSERT INTO major_city (composite,city_name,city_longitude,city_latitude,country_code,province,location_abbreviation,closest_water_body,distance,created_at,updated_at,created_by_user_id,updated_by_user_id,active) VALUES + ('Laramie (Wyoming USA)','Laramie',-105.562590,41.327440,'USA','Wyoming',' US-WY ',' Laramie River ',30.8,NULL,NULL,'','',true), + ('Lusk (Wyoming USA)','Lusk',-104.449140,42.753370,'USA','Wyoming',' US-WY ',' Glendo Reservoir ',47.4,NULL,NULL,'','',true), + ('Newcastle (Wyoming USA)','Newcastle',-104.243830,43.879310,'USA','Wyoming',' US-WY ',' Belle Fourche River ',63.8,NULL,NULL,'','',true), + ('Rawlins (Wyoming USA)','Rawlins',-107.235230,41.822260,'USA','Wyoming',' US-WY ',' Seminoe Reservoir ',41.6,NULL,NULL,'','',true), + ('Riverton (Wyoming USA)','Riverton',-108.389140,43.029430,'USA','Wyoming',' US-WY ',' Ocean Lake ',25.0,NULL,NULL,'','',true), + ('Rock Springs (Wyoming USA)','Rock Springs',-109.193070,41.544660,'USA','Wyoming',' US-WY ',' Flaming Gorge Reservoir ',57.6,NULL,NULL,'','',true), + ('Sheridan (Wyoming USA)','Sheridan',-107.006990,44.799660,'USA','Wyoming',' US-WY ',' Tongue River ',82.9,NULL,NULL,'','',true), + ('Thermopolis (Wyoming USA)','Thermopolis',-108.236710,43.679460,'USA','Wyoming',' US-WY ',' Boysen Reservoir ',39.3,NULL,NULL,'','',true), + ('Torrington (Wyoming USA)','Torrington',-104.151960,42.090800,'USA','Wyoming',' US-WY ',' North Platte ',72.9,NULL,NULL,'','',true), + ('Worland (Wyoming USA)','Worland',-107.912410,44.032820,'USA','Wyoming',' US-WY ',' Greybull River ',62.6,NULL,NULL,'','',true); diff --git a/api/api_sources/schema-migration-sql/MajorCitySchema/MajorCitySchema.sql b/api/api_sources/schema-migration-sql/MajorCitySchema/MajorCitySchema.sql index 8c9b0d52d..33d1f6d32 100644 --- a/api/api_sources/schema-migration-sql/MajorCitySchema/MajorCitySchema.sql +++ b/api/api_sources/schema-migration-sql/MajorCitySchema/MajorCitySchema.sql @@ -1,4 +1,4 @@ -CREATE TABLE invasivesbc.major_city ( +CREATE TABLE major_city ( composite character varying(1024), city_name character varying(1024), city_longitude numeric, @@ -13,17 +13,14 @@ CREATE TABLE invasivesbc.major_city ( updated_at timestamp without time zone, created_by_user_id character varying(100), updated_by_user_id character varying(100), - active_ind boolean + active boolean ); - -ALTER TABLE invasivesbc.major_city OWNER TO invasivebc; - -- -- Name: major_city_major_city_id_seq; Type: SEQUENCE; Schema: invasivesbc; Owner: invasivebc -- -CREATE SEQUENCE invasivesbc.major_city_major_city_id_seq +CREATE SEQUENCE major_city_major_city_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -31,25 +28,23 @@ CREATE SEQUENCE invasivesbc.major_city_major_city_id_seq CACHE 1; -ALTER TABLE invasivesbc.major_city_major_city_id_seq OWNER TO invasivebc; - -- -- Name: major_city_major_city_id_seq; Type: SEQUENCE OWNED BY; Schema: invasivesbc; Owner: invasivebc -- -ALTER SEQUENCE invasivesbc.major_city_major_city_id_seq OWNED BY invasivesbc.major_city.major_city_id; +ALTER SEQUENCE major_city_major_city_id_seq OWNED BY major_city.major_city_id; -- -- Name: major_city major_city_id; Type: DEFAULT; Schema: invasivesbc; Owner: invasivebc -- -ALTER TABLE ONLY invasivesbc.major_city ALTER COLUMN major_city_id SET DEFAULT nextval('invasivesbc.major_city_major_city_id_seq'::regclass); +ALTER TABLE ONLY major_city ALTER COLUMN major_city_id SET DEFAULT nextval('major_city_major_city_id_seq'::regclass); -- -- Name: major_city major_city_pkey; Type: CONSTRAINT; Schema: invasivesbc; Owner: invasivebc -- -ALTER TABLE ONLY invasivesbc.major_city - ADD CONSTRAINT major_city_pkey PRIMARY KEY (major_city_id); \ No newline at end of file +ALTER TABLE ONLY major_city + ADD CONSTRAINT major_city_pkey PRIMARY KEY (major_city_id); diff --git a/api/api_sources/schema-migration-sql/PreviousAISKnowledgeSourceSchema/PreviousAISKnowledgeSourceSchema-init.sql b/api/api_sources/schema-migration-sql/PreviousAISKnowledgeSourceSchema/PreviousAISKnowledgeSourceSchema-init.sql index 633adcc7d..9d79104b4 100644 --- a/api/api_sources/schema-migration-sql/PreviousAISKnowledgeSourceSchema/PreviousAISKnowledgeSourceSchema-init.sql +++ b/api/api_sources/schema-migration-sql/PreviousAISKnowledgeSourceSchema/PreviousAISKnowledgeSourceSchema-init.sql @@ -99,3 +99,8 @@ INSERT INTO previous_ais_knowledge_source_code(description) VALUES ('US/Canada Border Inspection'); -- ## End of item: 19 ## -- +-- ## Inserting Item: 20 ## -- +INSERT INTO previous_ais_knowledge_source_code(description) +VALUES +('Parks Canada'); +-- ## End of item: 20 ## -- \ No newline at end of file diff --git a/api/api_sources/schema-migration-sql/PreviousInspectionSourceSchema/PreviousInspectionSourceSchema-init.sql b/api/api_sources/schema-migration-sql/PreviousInspectionSourceSchema/PreviousInspectionSourceSchema-init.sql index 3513fc593..1ad0fbfd6 100644 --- a/api/api_sources/schema-migration-sql/PreviousInspectionSourceSchema/PreviousInspectionSourceSchema-init.sql +++ b/api/api_sources/schema-migration-sql/PreviousInspectionSourceSchema/PreviousInspectionSourceSchema-init.sql @@ -449,3 +449,28 @@ INSERT INTO previous_inspection_source_code(description) VALUES ('Wyoming'); -- ## End of item: 89 ## -- +-- ## Inserting Item: 90 ## -- +INSERT INTO previous_inspection_source_code(description) +VALUES +('Jasper National Park'); +-- ## End of item: 90 ## -- +-- ## Inserting Item: 91 ## -- +INSERT INTO previous_inspection_source_code(description) +VALUES +('Kootenay National Park'); +-- ## End of item: 91 ## -- +-- ## Inserting Item: 92 ## -- +INSERT INTO previous_inspection_source_code(description) +VALUES +('Lake Minnewanka (Banff National Park)'); +-- ## End of item: 92 ## -- +-- ## Inserting Item: 93 ## -- +INSERT INTO previous_inspection_source_code(description) +VALUES +('Waterton Lakes National Park'); +-- ## End of item: 93 ## -- +-- ## Inserting Item: 94 ## -- +INSERT INTO previous_inspection_source_code(description) +VALUES +('Yoho National Park'); +-- ## End of item: 94 ## -- diff --git a/api/api_sources/schema-migration-sql/WaterBodySchema/WaterBodySchema-february2022.sql b/api/api_sources/schema-migration-sql/WaterBodySchema/WaterBodySchema-february2022.sql new file mode 100644 index 000000000..00c530787 --- /dev/null +++ b/api/api_sources/schema-migration-sql/WaterBodySchema/WaterBodySchema-february2022.sql @@ -0,0 +1,6 @@ +-- ## Inserting into table: water_body ## -- +-- ## Inserting Item: 2158 ## -- +INSERT INTO water_body(water_body_name,water_body_latitude,water_body_longitude,country_code,province_code,closest_city,distance) +VALUES +('St. Lawrence River','-69.716553','47.68725','CAN','QC','Quebec City','150'); +-- ## End of item: 2158 ## -- diff --git a/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-cleanDrainDryAfterInspection-20220204.down.sql b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-cleanDrainDryAfterInspection-20220204.down.sql new file mode 100644 index 000000000..15608e3e5 --- /dev/null +++ b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-cleanDrainDryAfterInspection-20220204.down.sql @@ -0,0 +1,7 @@ +-- ## Changing table: watercraft_risk_assessment +-- ## Version: previousInspectionDays +-- ## Info: Removing column CleanDrainDryAfterInspection + +-- ## Removing New Columns ## -- +ALTER TABLE watercraft_risk_assessment DROP COLUMN IF EXISTS clean_drain_dry_after_inspection_ind; +-- ## -- diff --git a/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-cleanDrainDryAfterInspection-20220204.up.sql b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-cleanDrainDryAfterInspection-20220204.up.sql new file mode 100644 index 000000000..cc13a09c5 --- /dev/null +++ b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-cleanDrainDryAfterInspection-20220204.up.sql @@ -0,0 +1,8 @@ +-- ## Changing table: watercraft_risk_assessment +-- ## Version: previousInspectionDays +-- ## Info: Adding column CleanDrainDryAfterInspection +-- ## Adding New Columns ## -- + +-- ## Adding Column clean_drain_dry_after_inspection_ind on table watercraft_risk_assessment +ALTER TABLE watercraft_risk_assessment ADD COLUMN clean_drain_dry_after_inspection_ind BOOLEAN NOT NULL DEFAULT FALSE; +-- ## -- diff --git a/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-dreissenidMusselsFoundPrevious-20220304.down.sql b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-dreissenidMusselsFoundPrevious-20220304.down.sql new file mode 100644 index 000000000..124be696d --- /dev/null +++ b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-dreissenidMusselsFoundPrevious-20220304.down.sql @@ -0,0 +1,7 @@ +-- ## Changing table: watercraft_risk_assessment +-- ## Version: dreissenidMusselsFoundPrevious +-- ## Info: Removing column DreissenidMusselsFoundPrevious + +-- ## Removing New Columns ## -- +ALTER TABLE watercraft_risk_assessment DROP COLUMN IF EXISTS dreissenid_mussels_found_previous; +-- ## -- diff --git a/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-dreissenidMusselsFoundPrevious-20220304.up.sql b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-dreissenidMusselsFoundPrevious-20220304.up.sql new file mode 100644 index 000000000..c1a0f73d5 --- /dev/null +++ b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-dreissenidMusselsFoundPrevious-20220304.up.sql @@ -0,0 +1,8 @@ +-- ## Changing table: watercraft_risk_assessment +-- ## Version: dreissenidMusselsFoundPrevious +-- ## Info: Adding column DreissenidMusselsFoundPrevious +-- ## Adding New Columns ## -- + +-- ## Adding Column dreissenid_mussels_found_previous on table watercraft_risk_assessment +ALTER TABLE watercraft_risk_assessment ADD COLUMN dreissenid_mussels_found_previous BOOLEAN NOT NULL DEFAULT FALSE; +-- ## -- diff --git a/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-inspectionTime-20210706.down.sql b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-inspectionTime-20210706.down.sql new file mode 100644 index 000000000..e6a9bb360 --- /dev/null +++ b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-inspectionTime-20210706.down.sql @@ -0,0 +1,7 @@ +-- ## Reverting table: watercraft_risk_assessment +-- ## Version: inspectionTime +-- ## Info: Adding new column inspectionTime +-- ## Removing New Columns ## -- +ALTER TABLE watercraft_risk_assessment DROP COLUMN IF EXISTS inspection_time; + +-- ## Updating watercraft_risk_assessment ## -- diff --git a/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-inspectionTime-20210706.up.sql b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-inspectionTime-20210706.up.sql new file mode 100644 index 000000000..40cd9c838 --- /dev/null +++ b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-inspectionTime-20210706.up.sql @@ -0,0 +1,12 @@ +-- ## Changing table: watercraft_risk_assessment +-- ## Version: inspectionTime +-- ## Info: Adding new column inspectionTime +-- ## Adding New Columns ## -- + +-- ## Adding Column inspection_time on table watercraft_risk_assessment +ALTER TABLE watercraft_risk_assessment ADD COLUMN inspection_time VARCHAR(100) NULL; +COMMENT ON COLUMN watercraft_risk_assessment.inspection_time IS 'The time of the inspection'; +-- ## -- + + +-- ## Updating watercraft_risk_assessment ## -- diff --git a/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-k9InspectionResults-20230330.down.sql b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-k9InspectionResults-20230330.down.sql new file mode 100644 index 000000000..919e267af --- /dev/null +++ b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-k9InspectionResults-20230330.down.sql @@ -0,0 +1,7 @@ +-- ## Reverting table: watercraft_risk_assessment +-- ## Version: k9InspectionResults +-- ## Info: Adding new column inspectionTime +-- ## Removing New Columns ## -- +ALTER TABLE watercraft_risk_assessment DROP COLUMN IF EXISTS k9_inspection_results; + +-- ## Updating watercraft_risk_assessment ## -- diff --git a/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-k9InspectionResults-20230330.up.sql b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-k9InspectionResults-20230330.up.sql new file mode 100644 index 000000000..202da6ce1 --- /dev/null +++ b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-k9InspectionResults-20230330.up.sql @@ -0,0 +1,12 @@ +-- ## Changing table: watercraft_risk_assessment +-- ## Version: k9InspectionResults +-- ## Info: Adding new column inspectionTime +-- ## Adding New Columns ## -- + +-- ## Adding Column inspection_time on table watercraft_risk_assessment +ALTER TABLE watercraft_risk_assessment ADD COLUMN k9_inspection_results VARCHAR(100) NULL; +COMMENT ON COLUMN watercraft_risk_assessment.inspection_time IS 'result of the k9 inspection'; +-- ## -- + + +-- ## Updating watercraft_risk_assessment ## -- diff --git a/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-previousInspectionDays-20220204.down.sql b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-previousInspectionDays-20220204.down.sql new file mode 100644 index 000000000..475c0d40c --- /dev/null +++ b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-previousInspectionDays-20220204.down.sql @@ -0,0 +1,8 @@ +-- ## Changing table: watercraft_risk_assessment +-- ## Version: previousInspectionDays +-- ## Info: Reverting column previous_inspection_days_count to its previous state +-- ## Adding New Columns ## -- + +-- ## Updating Column previous_inspection_days_count on table watercraft_risk_assessment +ALTER TABLE watercraft_risk_assessment ALTER COLUMN previous_inspection_days_count TYPE INT USING previous_inspection_days_count::integer; +-- ## -- diff --git a/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-previousInspectionDays-20220204.up.sql b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-previousInspectionDays-20220204.up.sql new file mode 100644 index 000000000..b38a824c1 --- /dev/null +++ b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-previousInspectionDays-20220204.up.sql @@ -0,0 +1,8 @@ +-- ## Changing table: watercraft_risk_assessment +-- ## Version: previousInspectionDays +-- ## Info: Updating column previous_inspection_days_count +-- ## Adding New Columns ## -- + +-- ## Updating Column previous_inspection_days_count on table watercraft_risk_assessment +ALTER TABLE watercraft_risk_assessment ALTER COLUMN previous_inspection_days_count TYPE VARCHAR(100); +-- ## -- diff --git a/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-previousInspectionDays-20220303.down.sql b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-previousInspectionDays-20220303.down.sql new file mode 100644 index 000000000..de3a6d4f5 --- /dev/null +++ b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-previousInspectionDays-20220303.down.sql @@ -0,0 +1,8 @@ +-- ## Changing table: watercraft_risk_assessment +-- ## Version: previousInspectionDays +-- ## Info: Updating column previous_inspection_days_count +-- ## Adding New Columns ## -- + +-- ## Updating Column previous_inspection_days_count on table watercraft_risk_assessment +ALTER TABLE watercraft_risk_assessment ALTER COLUMN previous_inspection_days_count SET NOT NULL; +-- ## -- diff --git a/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-previousInspectionDays-20220303.up.sql b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-previousInspectionDays-20220303.up.sql new file mode 100644 index 000000000..5bc923377 --- /dev/null +++ b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema-previousInspectionDays-20220303.up.sql @@ -0,0 +1,8 @@ +-- ## Changing table: watercraft_risk_assessment +-- ## Version: previousInspectionDays +-- ## Info: Updating column previous_inspection_days_count +-- ## Adding New Columns ## -- + +-- ## Updating Column previous_inspection_days_count on table watercraft_risk_assessment +ALTER TABLE watercraft_risk_assessment ALTER COLUMN previous_inspection_days_count DROP NOT NULL; +-- ## -- diff --git a/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema.sql b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema.sql index c85cb8190..ba5d7de6d 100644 --- a/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema.sql +++ b/api/api_sources/schema-migration-sql/WatercraftRiskAssessmentSchema/WatercraftRiskAssessmentSchema.sql @@ -5,6 +5,7 @@ CREATE TABLE watercraft_risk_assessment (); ALTER TABLE watercraft_risk_assessment ADD COLUMN watercraft_risk_assessment_id SERIAL PRIMARY KEY; ALTER TABLE watercraft_risk_assessment ADD COLUMN timestamp TIMESTAMP NOT NULL; ALTER TABLE watercraft_risk_assessment ADD COLUMN passport_holder_ind BOOLEAN NOT NULL DEFAULT FALSE; +ALTER TABLE watercraft_risk_assessment ADD COLUMN is_new_passport_issued BOOLEAN NOT NULL DEFAULT FALSE; ALTER TABLE watercraft_risk_assessment ADD COLUMN k9_inspection_ind BOOLEAN NOT NULL DEFAULT FALSE; ALTER TABLE watercraft_risk_assessment ADD COLUMN marine_species_found_ind BOOLEAN NOT NULL DEFAULT FALSE; ALTER TABLE watercraft_risk_assessment ADD COLUMN aquatic_plants_found_ind BOOLEAN NOT NULL DEFAULT FALSE; @@ -19,15 +20,18 @@ ALTER TABLE watercraft_risk_assessment ADD COLUMN high_risk_area_ind BOOLEAN NOT ALTER TABLE watercraft_risk_assessment ADD COLUMN high_risk_ais_ind BOOLEAN NOT NULL DEFAULT FALSE; ALTER TABLE watercraft_risk_assessment ADD COLUMN previous_dry_storage_ind BOOLEAN NOT NULL DEFAULT FALSE; ALTER TABLE watercraft_risk_assessment ADD COLUMN destination_dry_storage_ind BOOLEAN NOT NULL DEFAULT FALSE; +ALTER TABLE watercraft_risk_assessment ADD COLUMN previous_major_city VARCHAR(100) NULL; +ALTER TABLE watercraft_risk_assessment ADD COLUMN destination_major_city VARCHAR(100) NULL; ALTER TABLE watercraft_risk_assessment ADD COLUMN unknown_previous_water_body_ind BOOLEAN NOT NULL DEFAULT FALSE; ALTER TABLE watercraft_risk_assessment ADD COLUMN unknown_destination_water_body_ind BOOLEAN NOT NULL DEFAULT FALSE; ALTER TABLE watercraft_risk_assessment ADD COLUMN commercial_manufacturer_as_previous_water_body_ind BOOLEAN NOT NULL DEFAULT FALSE; ALTER TABLE watercraft_risk_assessment ADD COLUMN commercial_manufacturer_as_destination_water_body_ind BOOLEAN NOT NULL DEFAULT FALSE; +ALTER TABLE watercraft_risk_assessment ADD COLUMN dreissenid_mussels_found_previous BOOLEAN NOT NULL DEFAULT FALSE; ALTER TABLE watercraft_risk_assessment ADD COLUMN non_motorized_counter INT NULL; ALTER TABLE watercraft_risk_assessment ADD COLUMN simple_counter INT NULL; ALTER TABLE watercraft_risk_assessment ADD COLUMN complex_counter INT NULL; ALTER TABLE watercraft_risk_assessment ADD COLUMN very_complex_count INT NULL; -ALTER TABLE watercraft_risk_assessment ADD COLUMN previous_inspection_days_count INT NULL; +ALTER TABLE watercraft_risk_assessment ADD COLUMN previous_inspection_days_count VARCHAR(100) NULL; ALTER TABLE watercraft_risk_assessment ADD COLUMN general_comment VARCHAR(300) NULL; ALTER TABLE watercraft_risk_assessment ADD COLUMN passport_number VARCHAR(100) NULL; ALTER TABLE watercraft_risk_assessment ADD COLUMN decontamination_reference VARCHAR(100) NULL; @@ -46,6 +50,7 @@ COMMENT ON TABLE watercraft_risk_assessment IS 'This is schema for data model of COMMENT ON COLUMN watercraft_risk_assessment.watercraft_risk_assessment_id IS 'Auto generated primary key'; COMMENT ON COLUMN watercraft_risk_assessment.timestamp IS 'Date and time of watercraft observation.'; COMMENT ON COLUMN watercraft_risk_assessment.passport_holder_ind IS 'Indicator to show that inspected boat has previously issued passport'; +COMMENT ON COLUMN watercraft_risk_assessment.is_new_passport_issued IS 'Indicator to show that inspected boat was issued a new passport'; COMMENT ON COLUMN watercraft_risk_assessment.k9_inspection_ind IS 'Indicator to show that inspection type is K9'; COMMENT ON COLUMN watercraft_risk_assessment.marine_species_found_ind IS 'Indicator to show any marine species found during inspection'; COMMENT ON COLUMN watercraft_risk_assessment.aquatic_plants_found_ind IS 'Indicator to show any aquatic plants found during inspection'; @@ -60,15 +65,18 @@ COMMENT ON COLUMN watercraft_risk_assessment.high_risk_area_ind IS 'Indicator fl COMMENT ON COLUMN watercraft_risk_assessment.high_risk_ais_ind IS 'Indicator flag to check high risk AIS or not'; COMMENT ON COLUMN watercraft_risk_assessment.previous_dry_storage_ind IS 'Boolean indicator that watercraft''s previous water body is Dry Storage'; COMMENT ON COLUMN watercraft_risk_assessment.destination_dry_storage_ind IS 'Boolean indicator that watercraft''s destination water body is Dry Storage'; +COMMENT ON COLUMN watercraft_risk_assessment.previous_major_city IS 'The closest major city to previous water body'; +COMMENT ON COLUMN watercraft_risk_assessment.destination_major_city IS 'The closest major city to destination water body'; COMMENT ON COLUMN watercraft_risk_assessment.unknown_previous_water_body_ind IS 'Boolean indicate that watercraft''s previous water body is unknown'; COMMENT ON COLUMN watercraft_risk_assessment.unknown_destination_water_body_ind IS 'Boolean indicate that watercraft''s destination water body is unknown'; COMMENT ON COLUMN watercraft_risk_assessment.commercial_manufacturer_as_previous_water_body_ind IS 'Boolean indicate that watercraft''s previous water body is commercial manufacturer'; COMMENT ON COLUMN watercraft_risk_assessment.commercial_manufacturer_as_destination_water_body_ind IS 'Boolean indicate that watercraft''s destination water body is commercial manufacturer'; +COMMENT ON COLUMN watercraft_risk_assessment.dreissenid_mussels_found_previous IS 'Status flag to check if dreissenid mussels were found on the previous inspection or not'; COMMENT ON COLUMN watercraft_risk_assessment.non_motorized_counter IS 'Counter for non motorized boats in inspection'; COMMENT ON COLUMN watercraft_risk_assessment.simple_counter IS 'Counter for number of simple boats in the inspection'; COMMENT ON COLUMN watercraft_risk_assessment.complex_counter IS 'Counter for number of complex boats in the inspection'; COMMENT ON COLUMN watercraft_risk_assessment.very_complex_count IS 'Counter for number of very complex boats in the inspection'; -COMMENT ON COLUMN watercraft_risk_assessment.previous_inspection_days_count IS 'Counter for number of very complex boats in the inspection'; +COMMENT ON COLUMN watercraft_risk_assessment.previous_inspection_days_count IS 'Number of days the previous inspection was conducted'; COMMENT ON COLUMN watercraft_risk_assessment.general_comment IS 'General comment associated with assessment'; COMMENT ON COLUMN watercraft_risk_assessment.passport_number IS 'Passport number associated with previous inspection'; COMMENT ON COLUMN watercraft_risk_assessment.decontamination_reference IS 'Decontamination reference number. Optional and dependent on decontaminationPerformed indicator'; diff --git a/api/api_sources/sources/AppConfig/app.config.ts b/api/api_sources/sources/AppConfig/app.config.ts index bcfefec56..f16029ab5 100644 --- a/api/api_sources/sources/AppConfig/app.config.ts +++ b/api/api_sources/sources/AppConfig/app.config.ts @@ -12,7 +12,6 @@ declare const __dirname: any; class AppConfiguration { // Shared instance private static instance: AppConfiguration; - // Instance variables public port = 0; public host = '127.0.0.1'; diff --git a/api/api_sources/sources/database/database-schema/musselApp.schema.ts b/api/api_sources/sources/database/database-schema/musselApp.schema.ts index 1c68cb36c..000440c3d 100644 --- a/api/api_sources/sources/database/database-schema/musselApp.schema.ts +++ b/api/api_sources/sources/database/database-schema/musselApp.schema.ts @@ -112,3 +112,9 @@ export class AdultMusselsLocationSchema extends RecordTableSchema { return true; } } + +export class BlowBySchema extends RecordTableSchema { + get schemaFilePath(): string { + return getYAMLFilePath('blowBy.schema.yaml'); + } +} diff --git a/api/api_sources/sources/database/migrations/1572894977602-MusselAppDatabase.ts b/api/api_sources/sources/database/migrations/1572894977602-MusselAppDatabase.ts index 5de11100d..76afdb894 100644 --- a/api/api_sources/sources/database/migrations/1572894977602-MusselAppDatabase.ts +++ b/api/api_sources/sources/database/migrations/1572894977602-MusselAppDatabase.ts @@ -7,7 +7,9 @@ import { PreviousAISKnowledgeSourceSchema, PreviousInspectionSourceSchema, CountrySchema, - CountryProvinceSchema + CountryProvinceSchema, + MajorCitySchema, + } from '../database-schema'; import { AppDBMigrator } from '../applicationSchemaInterface'; @@ -21,6 +23,7 @@ export class MusselAppDatabase1572894977602 extends AppDBMigrator implements Mig previousAISKnowledgeSourceSchema: PreviousAISKnowledgeSourceSchema; previousInspectionSourceSchema: PreviousInspectionSourceSchema; countrySchema: CountrySchema; + majorCitiesSchema: MajorCitySchema; countryProvinceSchema: CountryProvinceSchema; /** * Setup @@ -31,6 +34,7 @@ export class MusselAppDatabase1572894977602 extends AppDBMigrator implements Mig this.previousAISKnowledgeSourceSchema = new PreviousAISKnowledgeSourceSchema(); this.previousInspectionSourceSchema = new PreviousInspectionSourceSchema(); this.countrySchema = new CountrySchema(); + this.majorCitiesSchema = new MajorCitySchema(); this.countryProvinceSchema = new CountryProvinceSchema(); this.waterCraftRiskAssessmentSchema = new WatercraftRiskAssessmentSchema(); this.observerWorkflowSchema = new ObserverWorkflowSchema(); @@ -41,6 +45,10 @@ export class MusselAppDatabase1572894977602 extends AppDBMigrator implements Mig // Add populate country table sql file this.addUpMigration(this.countrySchema.className, 'CountrySchema-init.sql'); + // Create Major Cities table + this.addSchemaInitVersion(this.majorCitiesSchema); + this.addUpMigration(this.majorCitiesSchema.className, 'MajorCitySchema-init.sql'); + // Create Country province table this.addSchemaInitVersion(this.countryProvinceSchema); // Run Constraint sql script @@ -82,6 +90,7 @@ export class MusselAppDatabase1572894977602 extends AppDBMigrator implements Mig await queryRunner.query(this.observerWorkflowSchema.dropTable()); await queryRunner.query(this.countryProvinceSchema.dropTable()); await queryRunner.query(this.countrySchema.dropTable()); + await queryRunner.query(this.majorCitiesSchema.dropTable()); await queryRunner.query('DROP TABLE IF EXISTS adult_mussels_location'); await queryRunner.query('DROP TABLE IF EXISTS previous_ais_knowledge_source'); await queryRunner.query('DROP TABLE IF EXISTS previous_inspection_source'); diff --git a/api/api_sources/sources/database/migrations/1587918551000-WatercraftRiskAssessmentUpdateInspectionTime.ts b/api/api_sources/sources/database/migrations/1587918551000-WatercraftRiskAssessmentUpdateInspectionTime.ts new file mode 100644 index 000000000..199d84eb3 --- /dev/null +++ b/api/api_sources/sources/database/migrations/1587918551000-WatercraftRiskAssessmentUpdateInspectionTime.ts @@ -0,0 +1,27 @@ +import {MigrationInterface, QueryRunner} from 'typeorm'; +import { AppDBMigrator } from '../applicationSchemaInterface'; +import { WatercraftRiskAssessmentSchema } from '../database-schema'; + +export class WatercraftRiskAssessmentUpdateInspectionTime1625599791000 extends AppDBMigrator implements MigrationInterface { + watercraftRiskAssessment: WatercraftRiskAssessmentSchema; + + setup() { + this.watercraftRiskAssessment = new WatercraftRiskAssessmentSchema(); + this.addSchemaVersion(this.watercraftRiskAssessment, 'inspectionTime'); + } + + public async up(queryRunner: QueryRunner): Promise { + // Start Log + this.log('[START]', 'UP'); + // Running all up migration files + await this.runQuerySqlFiles(this.upMigrations(), queryRunner); + this.log('[END]', 'UP'); + } + + public async down(queryRunner: QueryRunner): Promise { + this.log('[STAR]', 'DOWN'); + await this.runQuerySqlFiles(this.downMigrations(), queryRunner); + this.log('[END]', 'DOWN'); + } + +} diff --git a/api/api_sources/sources/database/migrations/1680217166599-K9InspectionResults.ts b/api/api_sources/sources/database/migrations/1680217166599-K9InspectionResults.ts new file mode 100644 index 000000000..915bdd3a5 --- /dev/null +++ b/api/api_sources/sources/database/migrations/1680217166599-K9InspectionResults.ts @@ -0,0 +1,27 @@ +import { MigrationInterface, QueryRunner } from 'typeorm'; +import { AppDBMigrator } from '../applicationSchemaInterface'; +import { WatercraftRiskAssessmentSchema } from '../database-schema'; + +export class K9InspectionResults1680217166599 extends AppDBMigrator implements MigrationInterface { + watercraftRiskAssessment: WatercraftRiskAssessmentSchema; + + setup() { + this.watercraftRiskAssessment = new WatercraftRiskAssessmentSchema(); + this.addSchemaVersion(this.watercraftRiskAssessment, 'k9InspectionResults'); + } + + public async up(queryRunner: QueryRunner): Promise { + // Start Log + this.log('[START]', 'UP'); + // Running all up migration files + await this.runQuerySqlFiles(this.upMigrations(), queryRunner); + this.log('[END]', 'UP'); + } + + public async down(queryRunner: QueryRunner): Promise { + this.log('[STAR]', 'DOWN'); + await this.runQuerySqlFiles(this.downMigrations(), queryRunner); + this.log('[END]', 'DOWN'); + } + +} diff --git a/api/api_sources/sources/database/migrations/1681165022709-AddMultipleLocations.ts b/api/api_sources/sources/database/migrations/1681165022709-AddMultipleLocations.ts new file mode 100644 index 000000000..fddcf9076 --- /dev/null +++ b/api/api_sources/sources/database/migrations/1681165022709-AddMultipleLocations.ts @@ -0,0 +1,28 @@ +import { MigrationInterface, QueryRunner } from 'typeorm'; +import { AppDBMigrator } from '../applicationSchemaInterface'; +import { HighRiskAssessmentSchema } from '../database-schema'; + + +export class AddMultipleLocations1681165022709 extends AppDBMigrator implements MigrationInterface { + highRiskAssessment: HighRiskAssessmentSchema; + + setup() { + this.highRiskAssessment = new HighRiskAssessmentSchema(); + this.addSchemaVersion(this.highRiskAssessment, 'addMultipleLocations'); + } + + public async up(queryRunner: QueryRunner): Promise { + // Start Log + this.log('[START]', 'UP'); + // Running all up migration files + await this.runQuerySqlFiles(this.upMigrations(), queryRunner); + this.log('[END]', 'UP'); + } + + public async down(queryRunner: QueryRunner): Promise { + this.log('[STAR]', 'DOWN'); + await this.runQuerySqlFiles(this.downMigrations(), queryRunner); + this.log('[END]', 'DOWN'); + } + +} diff --git a/api/api_sources/sources/database/migrations/1703285389562-CreateBlowBy.ts b/api/api_sources/sources/database/migrations/1703285389562-CreateBlowBy.ts new file mode 100644 index 000000000..fd60fdc31 --- /dev/null +++ b/api/api_sources/sources/database/migrations/1703285389562-CreateBlowBy.ts @@ -0,0 +1,42 @@ +import {MigrationInterface, QueryRunner} from 'typeorm'; +import { AppDBMigrator } from '../applicationSchemaInterface'; +import { BlowBySchema, ObserverWorkflowSchema } from '../database-schema'; + +export class CreateBlowBy1703888022971 extends AppDBMigrator implements MigrationInterface { + blowBySchema: BlowBySchema; + observerWorkflowSchema: ObserverWorkflowSchema; + + /** + * Setup + */ + setup() { + // Adding BlowBy schema to migrator + this.blowBySchema = new BlowBySchema(); + this.observerWorkflowSchema = new ObserverWorkflowSchema(); + + // Create BlowBy table + this.addSchemaInitVersion(this.blowBySchema); + } + + /** + * UP: Create DB method + */ + public async up(queryRunner: QueryRunner): Promise { + // Start Log + this.log('[START]', 'UP'); + // Running all up migration files + await this.runQuerySqlFiles(this.upMigrations(), queryRunner); + this.log('[END]', 'UP'); + } + + /** + * Down: Revert + */ + public async down(queryRunner: QueryRunner): Promise { + this.log('[START]', 'DOWN'); + await queryRunner.query(this.blowBySchema.dropTable()); + await queryRunner.query(this.observerWorkflowSchema.dropTable()); + this.log('[END]', 'DOWN'); + } + +} diff --git a/api/api_sources/sources/database/models/blowBy.ts b/api/api_sources/sources/database/models/blowBy.ts new file mode 100644 index 000000000..f36a803c2 --- /dev/null +++ b/api/api_sources/sources/database/models/blowBy.ts @@ -0,0 +1,87 @@ +// ** Model: BlowBy from schema BlowBySchema ** + +import { Column, Entity, PrimaryGeneratedColumn, JoinColumn, ManyToOne } from 'typeorm'; +import { BlowBySchema, ObserverWorkflowSchema } from '../database-schema'; +import { ModelProperty, PropertyType, ModelDescription } from '../../libs/core-model'; +import { ObserverWorkflow, Record } from '../models'; +import { DateTimeTransformer } from '../../libs/transformer'; + +/** Interface **/ +/** + * @description BlowBy create interface + */ +export interface BlowBySpec { + observerWorkflowId: ObserverWorkflow; + blowByTime: string; + watercraftComplexity: string; + reportedToRapp: boolean; +} +// -- End: BlowBySpec -- + + +/** Interface **/ +/** + * @description BlowBy update interface + */ +export interface BlowByUpdateSpec { + observerWorkflowId?: ObserverWorkflow; + blowByTime?: string; + watercraftComplexity?: string; + reportedToRapp?: boolean; +} +// -- End: BlowByUpdateSpec -- + +/** + * @description Data Model Class for BlowBySchema + */ +@ModelDescription({ + description: 'Data Model Class for BlowBySchema', + schema: BlowBySchema, + apiResource: false +}) +@Entity( { name: BlowBySchema.dbTable} ) +export class BlowBy extends Record implements BlowBySpec { + + /** + * Class Properties + */ + + /** + * @description Getter/Setter property for column {blow_by_id} + */ + @PrimaryGeneratedColumn() + @ModelProperty({type: PropertyType.number}) + blow_by_id: number; + + /** + * @description Getter/Setter property for column {observer_workflow_id} + */ + @ManyToOne( type => ObserverWorkflow, { eager: true}) + @JoinColumn({ name: BlowBySchema.columns.observerWorkflowId, referencedColumnName: ObserverWorkflowSchema.pk}) + @ModelProperty({type: PropertyType.object}) + observerWorkflowId: ObserverWorkflow; + + /** + * @description Getter/Setter property for column {blow_by_time} + */ + @Column({ name: BlowBySchema.columns.blowByTime, transformer: new DateTimeTransformer()}) + @ModelProperty({type: PropertyType.string}) + blowByTime: string; + + /** + * @description Getter/Setter property for column {watercraft_complexity} + */ + @Column({ name: BlowBySchema.columns.watercraftComplexity}) + @ModelProperty({type: PropertyType.string}) + watercraftComplexity: string; + + /** + * @description Getter/Setter property for column {reported_to_rapp} + */ + @Column({ name: BlowBySchema.columns.reportedToRapp}) + @ModelProperty({type: PropertyType.boolean}) + reportedToRapp: boolean; + +} + +// ------------------------------------- diff --git a/api/api_sources/sources/database/models/controllers/blowBy.controller.ts b/api/api_sources/sources/database/models/controllers/blowBy.controller.ts new file mode 100644 index 000000000..da3f75bf5 --- /dev/null +++ b/api/api_sources/sources/database/models/controllers/blowBy.controller.ts @@ -0,0 +1,49 @@ +// ** BlowByController ** // + +import { RecordController } from '../generic.data.models'; +import { BlowBy} from '../../models'; +import { BlowBySchema } from '../../database-schema'; + +// ** BlowByController ** // + + +/** + * @description Data Model Controller Class for BlowBySchema and BlowBy + */ +export class BlowByController extends RecordController { + /** + * @description Getter for shared instance + */ + public static get shared(): BlowByController { + return this.sharedInstance(BlowBy, BlowBySchema) as BlowByController; + } + + public async all(query?: any): Promise { + const options = query || {}; + options.relations = ['observerWorkflowId']; + return await this.repo.find(options) as BlowBy[]; + } + + get exportKeyPriorities(): {[key: string]: number} { + const basePriority = 1000; + const topPriority = 100; + return { + id: basePriority + topPriority, + observerWorkflowId: (basePriority + topPriority - 10), + blowByTime: (basePriority + topPriority - 50), + watercraftComplexity: (basePriority + topPriority - 60), + reportedToRapp: (basePriority + topPriority - 70), + }; + } + + processForExport(data: BlowBy): any { + const result: any = {}; + Object.keys(data).forEach((key) => { + if (this.exportKeyMapper[key]) { + result[this.exportKeyMapper[key]] = data[key]; + } + }); + return result; + } +} +// ---------------- diff --git a/api/api_sources/sources/database/models/controllers/watercraftRiskAssessment.controller.ts b/api/api_sources/sources/database/models/controllers/watercraftRiskAssessment.controller.ts index 022c0ea9b..44e46cb80 100644 --- a/api/api_sources/sources/database/models/controllers/watercraftRiskAssessment.controller.ts +++ b/api/api_sources/sources/database/models/controllers/watercraftRiskAssessment.controller.ts @@ -129,8 +129,8 @@ export class WatercraftRiskAssessmentController extends RecordController AdultMusselsLocation, { eager: true}) + @JoinColumn({ name: HighRiskAssessmentSchema.columns.standingWaterLocation1, referencedColumnName: AdultMusselsLocationSchema.pk}) + @ModelProperty({type: PropertyType.object}) + standingWaterLocation1: AdultMusselsLocation; + + /** + * @description Getter/Setter property for column {standing_water_location_code_id_2} + */ + @ManyToOne( type => AdultMusselsLocation, { eager: true}) + @JoinColumn({ name: HighRiskAssessmentSchema.columns.standingWaterLocation2, referencedColumnName: AdultMusselsLocationSchema.pk}) + @ModelProperty({type: PropertyType.object}) + standingWaterLocation2: AdultMusselsLocation; + + /** + * @description Getter/Setter property for column {standing_water_location_code_id_3} + */ + @ManyToOne( type => AdultMusselsLocation, { eager: true}) + @JoinColumn({ name: HighRiskAssessmentSchema.columns.standingWaterLocation3, referencedColumnName: AdultMusselsLocationSchema.pk}) + @ModelProperty({type: PropertyType.object}) + standingWaterLocation3: AdultMusselsLocation; + + /** + * @description Getter/Setter property for column {adult_mussels_location_code_id_1} + */ + @ManyToOne( type => AdultMusselsLocation, { eager: true}) + @JoinColumn({ name: HighRiskAssessmentSchema.columns.adultDreissenidaeMusselDetail1, referencedColumnName: AdultMusselsLocationSchema.pk}) + @ModelProperty({type: PropertyType.object}) + adultDreissenidaeMusselDetail1: AdultMusselsLocation; + + /** + * @description Getter/Setter property for column {adult_mussels_location_code_id_2} + */ + @ManyToOne( type => AdultMusselsLocation, { eager: true}) + @JoinColumn({ name: HighRiskAssessmentSchema.columns.adultDreissenidaeMusselDetail2, referencedColumnName: AdultMusselsLocationSchema.pk}) + @ModelProperty({type: PropertyType.object}) + adultDreissenidaeMusselDetail2: AdultMusselsLocation; + + /** + * @description Getter/Setter property for column {adult_mussels_location_code_id_3} + */ + @ManyToOne( type => AdultMusselsLocation, { eager: true}) + @JoinColumn({ name: HighRiskAssessmentSchema.columns.adultDreissenidaeMusselDetail3, referencedColumnName: AdultMusselsLocationSchema.pk}) + @ModelProperty({type: PropertyType.object}) + adultDreissenidaeMusselDetail3: AdultMusselsLocation; + } // ------------------------------------- diff --git a/api/api_sources/sources/database/models/index.ts b/api/api_sources/sources/database/models/index.ts index 1419ac24b..d5c432c43 100644 --- a/api/api_sources/sources/database/models/index.ts +++ b/api/api_sources/sources/database/models/index.ts @@ -77,6 +77,7 @@ export * from './behaviourCode'; export * from './animalSpecies'; export * from './animalObservation'; export * from './majorCity'; +export * from './blowBy'; /** * Controllers @@ -107,4 +108,5 @@ export * from './controllers/watercraftJourney.controller'; export * from './controllers/seed.controller'; export * from './controllers/animalObservation.controller'; export * from './controllers/majorCity.controller'; +export * from './controllers/blowBy.controller'; // ---------------------------------------------------------------------------------------------------------------- diff --git a/api/api_sources/sources/database/models/observerWorkflow.ts b/api/api_sources/sources/database/models/observerWorkflow.ts index f8a569a78..12a418418 100644 --- a/api/api_sources/sources/database/models/observerWorkflow.ts +++ b/api/api_sources/sources/database/models/observerWorkflow.ts @@ -4,7 +4,7 @@ import { Column, Entity, PrimaryGeneratedColumn} from 'typeorm'; import { ObserverWorkflowSchema } from '../database-schema'; import { ModelProperty, PropertyType, ModelDescription } from '../../libs/core-model'; -import { IntTransformer, DateTransformer, DateTimeTransformer } from '../../libs/transformer'; +import { DateTransformer, DateTimeTransformer, IntTransformer } from '../../libs/transformer'; import { Record } from './generic.data.models'; /** Interface **/ diff --git a/api/api_sources/sources/database/models/watercraftRiskAssessment.ts b/api/api_sources/sources/database/models/watercraftRiskAssessment.ts index 9cb410df5..e51353a71 100644 --- a/api/api_sources/sources/database/models/watercraftRiskAssessment.ts +++ b/api/api_sources/sources/database/models/watercraftRiskAssessment.ts @@ -51,8 +51,10 @@ import { WatercraftJourney } from './watercraftJourney'; export interface WatercraftRiskAssessmentSpec { timestamp: string; passportHolder: boolean; + inspectionTime: string; isNewPassportIssued: boolean; k9Inspection: boolean; + k9InspectionResults: string; marineSpeciesFound: boolean; aquaticPlantsFound: boolean; previousAISKnowledge: boolean; @@ -72,11 +74,12 @@ export interface WatercraftRiskAssessmentSpec { unknownDestinationWaterBody: boolean; commercialManufacturerAsPreviousWaterBody: boolean; commercialManufacturerAsDestinationWaterBody: boolean; + dreissenidMusselsFoundPrevious: boolean; nonMotorized: number; simple: number; complex: number; veryComplex: number; - previousInspectionDays: number; + previousInspectionDays: string; generalComment: string; passportNumber: string; decontaminationReference: string; @@ -98,7 +101,9 @@ export interface WatercraftRiskAssessmentSpec { export interface WatercraftRiskAssessmentUpdateSpec { timestamp?: string; passportHolder?: boolean; + inspectionTime: string; k9Inspection?: boolean; + k9InspectionResults?: string; marineSpeciesFound?: boolean; aquaticPlantsFound?: boolean; previousAISKnowledge?: boolean; @@ -118,11 +123,12 @@ export interface WatercraftRiskAssessmentUpdateSpec { unknownDestinationWaterBody?: boolean; commercialManufacturerAsPreviousWaterBody?: boolean; commercialManufacturerAsDestinationWaterBody?: boolean; + dreissenidMusselsFoundPrevious: boolean; nonMotorized?: number; simple?: number; complex?: number; veryComplex?: number; - previousInspectionDays?: number; + previousInspectionDays?: string; generalComment?: string; passportNumber?: string; decontaminationReference?: string; @@ -172,6 +178,13 @@ export class WatercraftRiskAssessment extends Record implements WatercraftRiskAs @ModelProperty({type: PropertyType.boolean}) passportHolder: boolean; + /** + * @description Getter/Setter property for column {inspection_time} + */ + @Column({ name: WatercraftRiskAssessmentSchema.columns.inspectionTime}) + @ModelProperty({type: PropertyType.string}) + inspectionTime: string; + /** * @description Getter/Setter property for column {is_new_passport_issued} */ @@ -186,6 +199,13 @@ export class WatercraftRiskAssessment extends Record implements WatercraftRiskAs @ModelProperty({type: PropertyType.boolean}) k9Inspection: boolean; + /** + * @description Getter/Setter property for column {inspection_time} + */ + @Column({ name: WatercraftRiskAssessmentSchema.columns.k9InspectionResults}) + @ModelProperty({type: PropertyType.string}) + k9InspectionResults: string; + /** * @description Getter/Setter property for column {marine_species_found_ind} */ @@ -319,6 +339,13 @@ export class WatercraftRiskAssessment extends Record implements WatercraftRiskAs @ModelProperty({type: PropertyType.boolean}) commercialManufacturerAsDestinationWaterBody: boolean; + /** + * @description Getter/Setter property for column {dreissenid_mussels_found_previous} + */ + @Column({ name: WatercraftRiskAssessmentSchema.columns.dreissenidMusselsFoundPrevious}) + @ModelProperty({type: PropertyType.boolean}) + dreissenidMusselsFoundPrevious: boolean; + /** * @description Getter/Setter property for column {non_motorized_counter} */ @@ -350,9 +377,9 @@ export class WatercraftRiskAssessment extends Record implements WatercraftRiskAs /** * @description Getter/Setter property for column {previous_inspection_days_count} */ - @Column({name: WatercraftRiskAssessmentSchema.columns.previousInspectionDays, transformer: new IntTransformer()}) - @ModelProperty({type: PropertyType.number}) - previousInspectionDays: number; + @Column({name: WatercraftRiskAssessmentSchema.columns.previousInspectionDays}) + @ModelProperty({type: PropertyType.string}) + previousInspectionDays: string; /** * @description Getter/Setter property for column {general_comment} diff --git a/api/api_sources/sources/libs/utilities/bc.helpers.ts b/api/api_sources/sources/libs/utilities/bc.helpers.ts index ba3b4080f..1f3600eda 100644 --- a/api/api_sources/sources/libs/utilities/bc.helpers.ts +++ b/api/api_sources/sources/libs/utilities/bc.helpers.ts @@ -21,6 +21,8 @@ */ import * as assert from 'assert'; import AppConfig from '../../AppConfig'; +import axios from 'axios'; +const getPem = require('rsa-pem-from-mod-exp'); /** * @description Require common utility module as any @@ -32,16 +34,70 @@ const commonUtility = require('@bcgov/nodejs-common-utils'); * @export class BCHelperLib */ export class BCHelperLib { + /** + * @description Constructing + */ /** * @description Get certificate for JWT token validation * @returns Promise<{algorithm: any, certificate: any}> */ static async getCertificate(): Promise { - const { getJwtCertificate} = commonUtility; - assert(getJwtCertificate, 'No getJwtCertificate lib'); - const { algorithm, certificate } = await getJwtCertificate(AppConfig.certificateURL); - return {algorithm, certificate}; + + interface CertificateResult { + algorithm: string; + certificate: string; + } + + const ssoCertificateUrl = AppConfig.certificateURL; + + // Assign algorith and certificate with the values from the parsed data from certificate + const { algorithm, certificate } = await new Promise(async (resolve, reject) => { + if (!ssoCertificateUrl) { + reject(new Error('No certificate URL provided')); + return; + } + try { + const response = await axios.get(ssoCertificateUrl); + if (response.data.keys && response.data.keys.length === 0) { + reject(new Error('No keys in certificate body')); + return; + } + // If enc is the use type of response.data.keys[0] you are in production and need to use the next key. + let certsJson = response.data.keys[0]; + if (certsJson.use === 'enc') { + certsJson = response.data.keys[1]; + } + const modulus = certsJson.n; + const exponent = certsJson.e; + const alg = certsJson.alg; + // Verify required fields were found in Certificate + if (!modulus) { + reject(new Error('No modulus')); + return; + } + if (!exponent) { + reject(new Error('No exponent')); + return; + } + if (!alg) { + reject(new Error('No algorithm')); + return; + } + // build a certificate + const pem = getPem(modulus, exponent); + resolve({ + certificate: pem, + algorithm: alg, + }); + } catch (error) { + const message = 'Unable to parse certificate(s)'; + reject(new Error(message)); + } + }); + assert(certificate, 'No getJwtCertificate'); + assert(algorithm, 'No algorithm'); + return { algorithm, certificate }; } /** diff --git a/api/api_sources/sources/server/core/auth.middleware.ts b/api/api_sources/sources/server/core/auth.middleware.ts index 8623b5710..a0e1cf93f 100644 --- a/api/api_sources/sources/server/core/auth.middleware.ts +++ b/api/api_sources/sources/server/core/auth.middleware.ts @@ -16,15 +16,13 @@ // limitations under the License. // // Created by Pushan Mitra on 2019-06-6. -/** - * Imports - */ + import * as passport from 'passport'; import * as express from 'express'; import * as assert from 'assert'; import { ExtractJwt, Strategy as JwtStrategy, StrategyOptions } from 'passport-jwt'; import AppConfig from '../../AppConfig'; -import { UserDataController, User, RoleCodeController, RolesCodeValue, RolesCode, UserSessionDataController, UserSession, AccountStatus} from '../../database/models'; +import { UserDataController, User, RoleCodeController, RolesCodeValue, RolesCode, UserSessionDataController, UserSession, AccountStatus } from '../../database/models'; import { LoggerBase } from '../logger'; import { errorBody } from './common.error.handler'; import { BCHelperLib } from '../../libs/utilities/bc.helpers'; @@ -38,24 +36,23 @@ export interface MiddlewareValidationResult { code?: number; success: boolean; } + /** * @description JWT bases passport auth middleware manager * @export class ApplicationAuthMiddleware */ export class ApplicationAuthMiddleware extends LoggerBase { private static shareInstance: any; - app: any = express(); - public static get shared(): ApplicationAuthMiddleware { return this.shareInstance || (this.shareInstance = new this()); } - + app: any = express(); constructor() { super(); } async validateUser(user: User, payload?: any): Promise { - return {success: true}; + return { success: true }; } /** @@ -67,16 +64,96 @@ export class ApplicationAuthMiddleware extends LoggerBase { // Get algorithm and public key const { algorithm, certificate } = await BCHelperLib.getCertificate(); const options: StrategyOptions = { - jwtFromRequest : ExtractJwt.fromAuthHeaderAsBearerToken(), + jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(), algorithms: [algorithm], secretOrKey: certificate, passReqToCallback: true, ignoreExpiration: true }; const jwtStrategy = new JwtStrategy(options, this._tokenCallback.bind(this)); - passport.use(jwtStrategy); } + /** + * @desc Given a keycloak token, creates a user + * @param payload JWT Data from keycloak + * @param api API information + * @returns New user object + */ + async createUserFromPayload(payload: any): Promise { + const { preferred_username, email, family_name, given_name, client_roles } = payload; + // Creating new user with keycloak roles + const user = UserDataController.shared.create(); + user.email = email || preferred_username; + user.preferredUsername = preferred_username || email; + user.firstName = given_name || 'Test'; + user.lastName = family_name || 'User'; + user.roles = await this.getRoleCodes(client_roles); + user.accountStatus = AccountStatus.active; + await UserDataController.shared.saveInDB(user); + return user; + } + async updateUserFromPayload(payload: any, user: User) { + const { preferred_username, email, family_name, given_name } = payload; + user.preferredUsername = preferred_username || user.preferredUsername; + user.email = email || user.email; + user.firstName = given_name; + user.lastName = family_name; + user.accountStatus = AccountStatus.active; + await UserDataController.shared.saveInDB(user); + return user; + } + + /** + * @desc Creates a session entry for a given user + * @param user Currently authenticated user + * @param expiry keycloak token expiry + * @returns updated user session + */ + async createUserSession(user: any, expiry: number) { + const newSession: UserSession = UserSessionDataController.shared.create(); + newSession.lastActiveAt = new Date(); + newSession.lastLoginAt = new Date(); + newSession.user = user; + newSession.tokenExpiry = new Date((expiry * 1000) || Date.now() + AppConfig.sessionLifeTime); + + // Saving new session and users + await UserSessionDataController.shared.saveInDB(newSession); + await UserDataController.shared.setCurrentSession(user, newSession); + return user; + } + + /** + * @desc parses user information from token and returns relevant user + * @param preferred_username Users preferred username from jwt + * @param email Users email address from jwt + * @param api url pointing to api + * @returns authenticated user + */ + async getUserInformationFromPayload(preferred_username: string, email: string, api: string): Promise { + ApplicationAuthMiddleware.logger.info(`${api} | Fetching using preferred_username => ${preferred_username}`); + let user: User = await UserDataController.shared.fetchOne({ preferredUsername: preferred_username }); + if (!user && email) { + ApplicationAuthMiddleware.logger.info(`${api} | Fetching using email => ${email}`); + user = await UserDataController.shared.fetchOne({ email: email }); + } + return user; + } + + /** + * Create list of user roles in invasives-db matching the keycloak roles + * @param roleCodes array of keycloak roles + * @returns Correlated rolecodes + */ + async getRoleCodes(roleCodes: string[]): Promise> { + const roles = []; + if (roleCodes.includes('admin')) { roles.push(await RoleCodeController.shared.getCode(RolesCodeValue.admin)); } + if (roleCodes.includes('dataEditor')) { roles.push(await RoleCodeController.shared.getCode(RolesCodeValue.editor)); } + if (roleCodes.includes('superUser')) { roles.push(await RoleCodeController.shared.getCode(RolesCodeValue.superUser)); } + if (roleCodes.includes('inspectAppOfficer')) { roles.push(await RoleCodeController.shared.getCode(RolesCodeValue.inspectAppOfficer)); } + if (roleCodes.includes('inspectAppAdmin')) { roles.push(await RoleCodeController.shared.getCode(RolesCodeValue.inspectAppAdmin)); } + if (roles.length === 0) { roles.push(await RoleCodeController.shared.getCode(RolesCodeValue.viewer)); } + return roles; + } /** * @description Passport token callback @@ -87,120 +164,79 @@ export class ApplicationAuthMiddleware extends LoggerBase { async _tokenCallback(request: express.Request, payload: any, done: any) { const { errorWithCode } = BCHelperLib.getCommonUtility(); try { - // Get user info - // ApplicationAuthMiddleware.logger.info(`Payload: ${JSON.stringify(payload)}`); - ApplicationAuthMiddleware.logger.disableInfoLog = true; - const { preferred_username, email, family_name, given_name} = payload; - assert((preferred_username || email), `Email And Preferred user name is missing from payload\n ${JSON.stringify(payload)}`); - - const api = `${request.originalUrl}[${request.method}]`; + // ApplicationAuthMiddleware.logger.info(`Payload: ${JSON.stringify(payload)}`); + ApplicationAuthMiddleware.logger.disableInfoLog = true; + const { preferred_username, email, client_roles } = payload; + assert((preferred_username || email), `Email And Preferred user name is missing from payload\n ${JSON.stringify(payload)}`); + const api = `${request.originalUrl}[${request.method}]`; - // Check token expiry - const expiry = (payload.exp * 1000); - if (expiry && expiry < Date.now()) { - const message = `Token is expired for user ${email}`; - ApplicationAuthMiddleware.logger.info(message); - if (!AppConfig.bypassTokenExpiry) { + // Check token expiry + const expiry = (payload.exp * 1000); + if (expiry && expiry < Date.now()) { + const message = `Token is expired for user ${email}`; + ApplicationAuthMiddleware.logger.info(message); + if (!AppConfig.bypassTokenExpiry) { ApplicationAuthMiddleware.logger.error(`Token Expire for user: ${email}`); ApplicationAuthMiddleware.logger.error(`Expiry: ${expiry}: current: ${Date.now()}, Diff: ${expiry - Date.now()}`); done(errorWithCode(401, message), false); return; - } else { - ApplicationAuthMiddleware.logger.info(`${api} | Allowing user in dev env`); - } - } - - // Get user - ApplicationAuthMiddleware.logger.info(`${api} | Getting user`); - let user: User; - if (preferred_username && email) { - ApplicationAuthMiddleware.logger.info(`${api} | Fetching using preferred_username => ${preferred_username}`); - user = await UserDataController.shared.fetchOne({preferredUsername: preferred_username}); - if (!user) { - ApplicationAuthMiddleware.logger.info(`${api} | Fetching using email => ${email}`); - user = await UserDataController.shared.fetchOne({email: email}); - } - } else { - ApplicationAuthMiddleware.logger.info(`${api} | Fetching user by preferredUsername: ${preferred_username} - - *** - \n[ISSUE]*: possibly email is missing from payload: \n${JSON.stringify(payload)}`); - user = await UserDataController.shared.fetchOne({ preferredUsername: preferred_username}); - } - if (!user) { - ApplicationAuthMiddleware.logger.info(`${api} | Creating new user with email and username: {${email}, ${preferred_username}}`); - - // Creating new user with viewer role - user = UserDataController.shared.create(); - user.email = email || preferred_username; - user.preferredUsername = preferred_username || email; - user.firstName = given_name || 'Test'; - user.lastName = family_name || 'User'; - user.roles = [await RoleCodeController.shared.getCode(RolesCodeValue.viewer)]; - user.accountStatus = AccountStatus.active; - await UserDataController.shared.saveInDB(user); - } else { - // Update user data if require - if (user.preferredUsername !== preferred_username || user.email !== email) { - user.preferredUsername = preferred_username || user.preferredUsername; - user.email = email || user.email; - user.firstName = given_name; - user.lastName = family_name; - user.accountStatus = AccountStatus.active; + } + } + ApplicationAuthMiddleware.logger.info(`${api} | Getting user`); + let user: User = await this.getUserInformationFromPayload(preferred_username, email, api); + if (user) { + // check current keycloak roles, update if they've changed + const keycloakRoles = await this.getRoleCodes(client_roles); + if (JSON.stringify(user.roles) !== JSON.stringify(keycloakRoles)) { + user.roles = keycloakRoles; await UserDataController.shared.saveInDB(user); - } - } - - ApplicationAuthMiddleware.logger.info(`${api} | User {${user.email}, ${user.preferredUsername} and status: ${user.accountStatus}}`); + } + if (user.preferredUsername !== preferred_username || user.email !== email) { + user = await this.updateUserFromPayload(payload, user); + } + } else { + ApplicationAuthMiddleware.logger.info(`${api} | Creating new user with email and username: {${email}, ${preferred_username}}`); + user = await this.createUserFromPayload(payload); + } - // Checking and creating status - if (user.accountStatus === undefined) { - user.accountStatus = AccountStatus.active; - await UserDataController.shared.saveInDB(user); - ApplicationAuthMiddleware.logger.info(`Creating status for user: ${user.email}`); - } + // Checking and creating status + if (user.accountStatus === undefined) { + user.accountStatus = AccountStatus.active; + await UserDataController.shared.saveInDB(user); + ApplicationAuthMiddleware.logger.info(`Creating status for user: ${user.email}`); + } - // Checking user validity {for subclasses} - const valid: MiddlewareValidationResult = await this.validateUser(user, payload); - if (!valid.success) { - done(errorWithCode(valid.message, valid.code), false); - return; - } + // Checking user validity {for subclasses} + const valid: MiddlewareValidationResult = await this.validateUser(user, payload); + if (!valid.success) { + done(errorWithCode(valid.message, valid.code), false); + return; + } - // Session Handling - const session = await UserDataController.shared.getCurrentSession(user); - if (session) { - // Check session validity - if (session.tokenExpiry < new Date() && !AppConfig.bypassTokenExpiry) { - const message = `${api} | Session Expire (app internal) for user ${user.email} at ${session.tokenExpiry}`; - ApplicationAuthMiddleware.logger.error(message); - // Remove current - await UserDataController.shared.removeSession(user); - // Fail Session + // Session Handling + const session = await UserDataController.shared.getCurrentSession(user); + if (session) { + if (session.tokenExpiry < new Date() && !AppConfig.bypassTokenExpiry) { + const message = `${api} | Session Expired (app internal) for user ${user.email} at ${session.tokenExpiry}`; + ApplicationAuthMiddleware.logger.error(message); + await UserDataController.shared.removeSession(user); done(errorWithCode(message, 401)); - } else { + } else { ApplicationAuthMiddleware.logger.info(`${api} | Session Active for user ${user.email}`); - session.lastActiveAt = new Date(); - session.tokenExpiry = new Date((payload.exp * 1000) || Date.now() + AppConfig.sessionLifeTime); - request['appUser'] = user; - done(null, user); - } - } else { - // Create New Session - ApplicationAuthMiddleware.logger.info(`${api} | Create New Session for user ${user.email}`); - const newSession: UserSession = UserSessionDataController.shared.create(); - newSession.lastActiveAt = new Date(); - newSession.lastLoginAt = new Date(); - newSession.user = user; - newSession.tokenExpiry = new Date((payload.exp * 1000) || Date.now() + AppConfig.sessionLifeTime); - - // Saving new session and users - await UserSessionDataController.shared.saveInDB(newSession); - await UserDataController.shared.setCurrentSession(user, newSession); - done(null, user); - } - - } catch (excp) { - ApplicationAuthMiddleware.logger.error(`_tokenCallback | Exception | ${excp}`); - done(excp, false); + session.lastActiveAt = new Date(); + session.tokenExpiry = new Date((payload.exp * 1000) || Date.now() + AppConfig.sessionLifeTime); + request['appUser'] = user; + done(null, user); + } + } else { + // Create New Session + ApplicationAuthMiddleware.logger.info(`${api} | Create New Session for user ${user.email}`); + user = await this.createUserSession(user, payload.exp); + done(null, user); + } + } catch (ex) { + ApplicationAuthMiddleware.logger.error(`_tokenCallback | Exception | ${ex}`); + done(ex, false); } } } @@ -218,33 +254,24 @@ export const authenticationMiddleWare = async (): Promise => { * @description Role authentication middleware * @export closure roleAuthenticationMiddleware * @param RolesCodeValue[] roles + * @returns middleware callback */ export const roleAuthenticationMiddleware = (roles: RolesCodeValue[]) => { - // Returning Middleware callback return (req: express.Request, resp: express.Response, next: any) => { try { - LoggerBase.logger.disableInfoLog = true; assert(req.user || req['appUser'], 'Invalid request parameters: [No User]'); const user: User = req.user || req['appUser']; const userRoles = user.roles; const acceptedRoles = userRoles.filter((item: RolesCode) => { const rc: RolesCodeValue = item.code as RolesCodeValue; const value = roles.includes(rc); - if (value) { - LoggerBase.logger.info(`roleAuthenticationMiddleware | => Role Accepted ${rc}`); - } else { - LoggerBase.logger.error(`roleAuthenticationMiddleware | => Role Not Accepted ${rc}`); - } - LoggerBase.logger.disableInfoLog = false; + LoggerBase.logger.info(`roleAuthenticationMiddleware | => Role ${value ? '' : 'not '}Accepted ${rc}`); return value; }); - LoggerBase.logger.disableInfoLog = false; return acceptedRoles.length > 0 ? next() : (resp.status(401).json(errorBody('User role is not authorized to access this route', [{ acceptedRoles: `Accepted roles are [${roles}]` }]))); - } catch (excp) { - LoggerBase.logger.disableInfoLog = false; resp.status(500).json(errorBody(`${excp}`, [excp])); } }; @@ -254,37 +281,22 @@ export const roleAuthenticationMiddleware = (roles: RolesCodeValue[]) => { * @description Admin only route check authentication middleware * @export closure adminOnlyRoute */ -export const adminOnlyRoute = () => { - return roleAuthenticationMiddleware([RolesCodeValue.admin]); -}; - +export const adminOnlyRoute = () => ( roleAuthenticationMiddleware([RolesCodeValue.admin]) ); /** - * @description Route For Editor + * @desc Route For Editor * @export closure writerOnlyRoute */ -export const writerOnlyRoute = () => { - return roleAuthenticationMiddleware([RolesCodeValue.admin, RolesCodeValue.editor]); -}; - +export const writerOnlyRoute = () => (roleAuthenticationMiddleware([RolesCodeValue.admin, RolesCodeValue.editor]) ); /** - * @description Route For all editors including inspect app admin + * @desc Route For all editors including inspect app admin * @export closure editorOnlyRoute */ -export const editorOnlyRoute = () => { - return roleAuthenticationMiddleware([RolesCodeValue.admin, RolesCodeValue.inspectAppAdmin, RolesCodeValue.editor]); -}; - +export const editorOnlyRoute = () => ( roleAuthenticationMiddleware([RolesCodeValue.admin, RolesCodeValue.inspectAppAdmin, RolesCodeValue.editor]) ); /** - * @description Route for inspect app editor + * @desc Route for inspect app editor */ -export const inspectAppEditorRoute = () => { - return roleAuthenticationMiddleware([RolesCodeValue.admin, RolesCodeValue.inspectAppAdmin, RolesCodeValue.inspectAppOfficer]); -}; - +export const inspectAppEditorRoute = () => ( roleAuthenticationMiddleware([RolesCodeValue.admin, RolesCodeValue.inspectAppAdmin, RolesCodeValue.inspectAppOfficer]) ); /** - * @description Route for inspect app admin + * @desc Route for inspect app admin */ -export const inspectAppAdminRoute = () => { - return roleAuthenticationMiddleware([RolesCodeValue.admin, RolesCodeValue.inspectAppAdmin]); -}; -// ----------------------------------------------------------------------------------------------------------- +export const inspectAppAdminRoute = () => ( roleAuthenticationMiddleware([RolesCodeValue.admin, RolesCodeValue.inspectAppAdmin])); diff --git a/api/api_sources/sources/server/core/base.route.controller.ts b/api/api_sources/sources/server/core/base.route.controller.ts index c9072e92b..d44c9b5f7 100755 --- a/api/api_sources/sources/server/core/base.route.controller.ts +++ b/api/api_sources/sources/server/core/base.route.controller.ts @@ -365,7 +365,7 @@ export class RouteController { const msg = `Authorization fail with error ${err}`; this.commonError(401, tag, err, resp, msg); } else if (!user) { - this.commonError(401, tag, 'Un-authorize access', resp, 'Un-authorize access (No User) check auth provider url'); + this.commonError(401, tag, 'Un-authorize access', resp, `Un-authorize access (No User) check auth provider url`); } else { req.user = user; next(); diff --git a/api/api_sources/sources/server/core/schema.validation.ts b/api/api_sources/sources/server/core/schema.validation.ts index 5008f11fb..4d45046ef 100644 --- a/api/api_sources/sources/server/core/schema.validation.ts +++ b/api/api_sources/sources/server/core/schema.validation.ts @@ -142,14 +142,21 @@ export class SchemaValidator { } else { info = { validate: validate => validate.isString().custom(async (value: string, {req}) => { - // 1. Check Size - assert(value, `${printKey}: Value must be defined`); - assert(value.length <= typeInfo.size, `${printKey}: Exceed maximum size ${typeInfo.size}`); - // 2. Regx check + if (field.required) { + // 1. Check Null + assert(value, `${printKey}: Value must be defined`); + } + + if (value) { + // 2. Check Size + assert(value.length <= typeInfo.size, `${printKey}: Exceed maximum size ${typeInfo.size}`); + } + + // 3. Regx check const verification = field.fieldVerification() || {}; if (verification.regx) { const regx = new RegExp(verification.regx.re, verification.regx.flag || 'gm'); - assert(value.match(regx), `${printKey}: should match regx: ${regx}`); + assert(regx.test(value), `${printKey}: should match regx: ${regx}`); } }), message: 'should be string', diff --git a/api/api_sources/sources/server/initializers/routes.ts b/api/api_sources/sources/server/initializers/routes.ts index 41b12a4a4..2b2a308e5 100644 --- a/api/api_sources/sources/server/initializers/routes.ts +++ b/api/api_sources/sources/server/initializers/routes.ts @@ -38,6 +38,7 @@ import { accountRoute, import { LocationRouteController } from '../modules/location'; import { BCGeoDataRouteController } from '../modules/bcGeoData'; import { defaultRoute, miscellaneousRouter } from '../modules'; +import { BlowByRouteController } from '../modules/blowBy'; /** * @description Configuring main app routes @@ -80,6 +81,9 @@ export const routes = (app: Application) => { // Observer Workflow app.use('/api/mussels/workflow', ObserverWorkflowRouteController.shared.router); + // Watercraft Risk Assessment + app.use('/api/mussels/blow-bys', BlowByRouteController.shared.router); + // Mussels App Codes app.use('/api/mussels/codes', MusselsAppCodesRouteController.shared.router); diff --git a/api/api_sources/sources/server/modules/blowBy/blowBy.route.ts b/api/api_sources/sources/server/modules/blowBy/blowBy.route.ts new file mode 100644 index 000000000..a461bcc14 --- /dev/null +++ b/api/api_sources/sources/server/modules/blowBy/blowBy.route.ts @@ -0,0 +1,74 @@ +/* + * Copyright © 2019 Province of British Columbia + * Licensed under the Apache License, Version 2.0 (the "License") + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * ** + * http://www.apache.org/licenses/LICENSE-2.0 + * ** + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * File: watercraftRiskAssessment.route.ts + * Project: lucy + * File Created: Tuesday, 5th November 2019 10:16:47 am + * Author: pushan + * ----- + * Last Modified: Tuesday, 5th November 2019 10:58:51 am + * Modified By: pushan + * ----- + */ +/** + * Imports + */ +import { + // SecureRouteController, + ResourceRoute, + CreateMiddleware, + ResourceRouteController, + UpdateMiddleware, + Get, + inspectAppEditorRoute, + inspectAppAdminRoute +} from '../../core'; +import { + BlowByController, + BlowBySpec +} from '../../../database/models'; + + +@ResourceRoute({ + path: '/api/mussels/blow-bys/#', + description: 'API route controller for Blow Bys', + dataController: BlowByController.shared, + // validators: CreateTreatmentValidator, + secure: true +}) +@CreateMiddleware(() => [ inspectAppEditorRoute() ]) +@UpdateMiddleware(() => [ inspectAppEditorRoute() ]) +export class BlowByRouteController extends ResourceRouteController { + static get shared(): BlowByRouteController { + return this.sharedInstance() as BlowByRouteController; + } + + /** + * @description Create New Object + * @param Request req + * @param any data + */ + public async createResource(req: any, data: any): Promise<[number, any]> { + // Get Proper data mapping + return [201, await this.dataController.createNewObject(data, req.user)]; + } + + @Get({ + path: '/export', + secure: true, + middleware: () => [ inspectAppAdminRoute() ] + }) + public async export() { + return [200, await this.dataController.export()]; + } +} diff --git a/api/api_sources/sources/server/modules/blowBy/index.ts b/api/api_sources/sources/server/modules/blowBy/index.ts new file mode 100644 index 000000000..35c9aa4f6 --- /dev/null +++ b/api/api_sources/sources/server/modules/blowBy/index.ts @@ -0,0 +1,24 @@ +/* + * Copyright © 2019 Province of British Columbia + * Licensed under the Apache License, Version 2.0 (the "License") + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * ** + * http://www.apache.org/licenses/LICENSE-2.0 + * ** + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * File: index.ts + * Project: lucy + * File Created: Thursday, 23rd April 2020 1:36:03 pm + * Author: Sustainment Team (you@you.you) + * ----- + * Last Modified: Thursday, 23rd April 2020 1:36:31 pm + * Modified By: Sustainment Team (you@you.you>) + * ----- + */ + +export * from './blowBy.route'; diff --git a/api/api_sources/sources/server/modules/watercraftObservation/constantData/mussels.code.route.spec.ts b/api/api_sources/sources/server/modules/watercraftObservation/constantData/mussels.code.route.spec.ts index 22f4b5dba..e5fb7bd17 100644 --- a/api/api_sources/sources/server/modules/watercraftObservation/constantData/mussels.code.route.spec.ts +++ b/api/api_sources/sources/server/modules/watercraftObservation/constantData/mussels.code.route.spec.ts @@ -75,4 +75,25 @@ describe(`Test for ${resourceName}`, () => { }); }); }); + + // Ticket #197: Additional stations fields + it('should return additional stations (#197)', async () => { + await testRequest(SharedExpressApp.app, { + type: HttpMethodType.get, + url: '/api/mussels/codes', + expect: 200, + auth: AuthType.viewer + }).then(async resp => { + await verifySuccessBody(resp.body, async (data: any) => { + should().exist(data.stations); + const stations: string[] = data.stations as string[]; + const filter = stations.filter( item => ( + item === 'Kootenay Sgt' || + item === 'Okanagan Sgt' || + item === 'Rocky Mountain Sgt') + ); + expect(filter.length).to.be.equal(3); + }); + }); + }); }); diff --git a/api/api_sources/sources/server/modules/watercraftObservation/constantData/mussels.code.route.ts b/api/api_sources/sources/server/modules/watercraftObservation/constantData/mussels.code.route.ts index 3b2d99c61..e3a8adab7 100644 --- a/api/api_sources/sources/server/modules/watercraftObservation/constantData/mussels.code.route.ts +++ b/api/api_sources/sources/server/modules/watercraftObservation/constantData/mussels.code.route.ts @@ -17,6 +17,8 @@ const Stations = require('../../../../../resources/jsons/musselsApp/MusselStatio const WatercraftList = require('../../../../../resources/jsons/musselsApp/MusselWatercrafts.json'); const DecontaminationOrderReasons = require('../../../../../resources/jsons/musselsApp/DecontaminationOrderReasons.json'); const DaysOutOfWater = require('../../../../../resources/jsons/musselsApp/DaysOutOfWater.json'); +const K9InspectionResults = require('../../../../../resources/jsons/musselsApp/K9InspectionResults.json'); +const DaysSincePreviousInspection = require('../../../../../resources/jsons/musselsApp/DaysSincePreviousInspection.json'); /** * @description Route Controller for Mussel app constants @@ -41,6 +43,8 @@ export class MusselsAppCodesRouteController extends SecureRouteController { const watercraftList: any[] = this.processList(WatercraftList as any[], 'Watercraft'); const decontaminationOrderReasonList: any[] = this.processList(DecontaminationOrderReasons as any[], 'Decontamination_Order_Reasons'); const daysOutOfWaterList: any[] = this.processList(DaysOutOfWater as any[], 'Days_Out_Of_Water'); + const k9InspectionResults: any[] = this.processList(K9InspectionResults as any[], 'K9_Inspection_Results'); + const daysSincePreviousInspectionList: any[] = this.processList(DaysSincePreviousInspection as any[], 'Days_Since_Previous_Inspection'); // Code tables const adultMusselsLocation: any[] = await AdultMusselsLocationController.shared.all(); @@ -54,6 +58,8 @@ export class MusselsAppCodesRouteController extends SecureRouteController { watercraftList: watercraftList, decontaminationOrderReasons: decontaminationOrderReasonList, daysOutOfWater: daysOutOfWaterList, + daysSincePreviousInspection: daysSincePreviousInspectionList, + k9InspectionResults: k9InspectionResults, adultMusselsLocation, previousAISKnowledgeSource, previousInspectionSource, diff --git a/api/api_sources/tsconfig.json b/api/api_sources/tsconfig.json index 8540cbaa3..fcac1e41f 100755 --- a/api/api_sources/tsconfig.json +++ b/api/api_sources/tsconfig.json @@ -40,6 +40,7 @@ "./node_modules/@types/mocha/index.d.ts", "./node_modules/@types/node/index.d.ts", "./node_modules/@types/jest/index.d.ts", - "./typings-custom/@bcgov/nodejs-common-utils.d.ts" + "./typings-custom/@bcgov/nodejs-common-utils.d.ts", + "./typings-custom/rsa-pem-from-mod-exp.d.ts" ] } diff --git a/api/api_sources/typings-custom/rsa-pem-from-mod-exp.d.ts b/api/api_sources/typings-custom/rsa-pem-from-mod-exp.d.ts new file mode 100644 index 000000000..b5849a2bf --- /dev/null +++ b/api/api_sources/typings-custom/rsa-pem-from-mod-exp.d.ts @@ -0,0 +1 @@ +declare module 'rsa-pem-from-mod-exp' \ No newline at end of file diff --git a/api/docker-compose.dev.yml b/api/docker-compose.dev.yml new file mode 100644 index 000000000..ac2eeccc8 --- /dev/null +++ b/api/docker-compose.dev.yml @@ -0,0 +1,107 @@ +version: "3.7" +services: + ############################################################ + # Database # + ############################################################ + db: + image: ${PROJECT_NAME}-${TAG}-postgress-img + container_name: ${PROJECT_NAME}-${TAG}-db + build: + context: ./.docker/db + dockerfile: Dockerfile.local + ports: + - ${DB_PORT}:${DB_PORT} + environment: + - POSTGRES_USER=${DB_USER} + - POSTGRES_PASSWORD=${DB_PASS} + - POSTGRES_DB=${DB_DATABASE} + - PORT=${DB_PORT} + networks: + - local-network + volumes: + - postgres:/var/lib/postgresql/data + healthcheck: + test: ["CMD", "pg_isready", "-h", "localhost", "-p", "5432", "-U", "postgres"] + interval: 10s + timeout: 5s + retries: 3 + ############################################################ + # API # + ############################################################ + app_api: + platform: linux/x86_64 + image: ${PROJECT_NAME}-${TAG}-api-img + container_name: ${PROJECT_NAME}-${TAG}-api + build: + context: ./api_sources + dockerfile: .build/Dockerfile.local + ports: + - ${API_PORT}:${API_PORT} + environment: + - PORT=${API_PORT} + - DB_HOST=${DB_HOST} + - DB_USER=${DB_USER} + - DB_PASS=${DB_PASS} + - DB_PORT=${DB_PORT} + - DB_DATABASE=${DB_DATABASE} + - APP_CERTIFICATE_URL=${APP_CERTIFICATE_URL} + - APP_CERTIFICATE_URL_TEST=${APP_CERTIFICATE_URL_TEST} + - VERSION=${VERSION} + - ENVIRONMENT=local + - DB_MIGRATION_TYPE=normal + - DB_SEED=yes + - DB_CLEAN_UP=none + - APP_EMAIL_SENDER=${APP_EMAIL_SENDER} + - APP_EMAIL_SENDER_PWD=${APP_EMAIL_SENDER_PWD} + - APP_EMAIL_TEST_RECEIVER=${APP_EMAIL_TEST_RECEIVER} + - APP_REPORT_RECEIVER=${APP_REPORT_RECEIVER} + volumes: + - ./api_sources:/opt/app-root/src + - npmcache:/opt/app-root/src/node_modules + networks: + - local-network + depends_on: + db: + condition: service_healthy + command: ["npm", "run", "hotload"] + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:${API_PORT}/api/misc/version"] + interval: 30s + timeout: 10s + retries: 5 + + app_dependency: + image: ${PROJECT_NAME}-${TAG}-api-dep-img + container_name: ${PROJECT_NAME}-${TAG}-api-dep + build: + context: ./api_sources + dockerfile: .build/Dockerfile.npm + volumes: + - npmcache:/opt/app-root/src/node_modules + ############################################################ + # PGAdmin # + ############################################################ + pgadmin: + container_name: pgadmin + image: dpage/pgadmin4 + ports: + - 5050:80 + environment: + PGADMIN_DEFAULT_PASSWORD: admin + PGADMIN_DEFAULT_EMAIL: admin@invasives.com + networks: + - local-network + + +############################################################ +# Network/Volumes # +############################################################ +networks: + local-network: + driver: bridge + +volumes: + postgres: + name: ${PROJECT_NAME}-${TAG}-vol-postgres + npmcache: + name: ${PROJECT_NAME}-${TAG}-vol-npmcache diff --git a/api/docs/user.info.json b/api/docs/user.info.json index e30fa5ef0..c58f7fdde 100644 --- a/api/docs/user.info.json +++ b/api/docs/user.info.json @@ -3,7 +3,7 @@ "exp": 1557947030, "nbf": 0, "iat": 1557946730, - "iss": "https://oidc.gov.bc.ca/auth/realms/dfmlcg7z", + "iss": "https://loginproxy.gov.bc.ca/auth/realms/standard", "aud": "lucy", "sub": "32e33e03-9d12-43a5-88e6-ce031fc36be8", "typ": "Bearer", diff --git a/api/openshift/api.bc.yaml b/api/openshift/api.bc.yaml index e0960b293..9680af97c 100644 --- a/api/openshift/api.bc.yaml +++ b/api/openshift/api.bc.yaml @@ -1,16 +1,16 @@ -apiVersion: v1 +apiVersion: template.openshift.io/v1 kind: Template metadata: creationTimestamp: null labels: - build: invasivebc-api - name: invasivebc-api + build: invasivesbc-api + name: invasivesbc-api parameters: - name: NAME displayName: Name description: A suffix appended to all objects required: true - value: invasivebc-api + value: invasivesbc-api - name: SUFFIX displayName: Name Suffix description: A suffix appended to all objects @@ -111,4 +111,4 @@ objects: - type: ConfigChange - type: ImageChange status: - lastVersion: 7 \ No newline at end of file + lastVersion: 7 diff --git a/api/openshift/bc.yaml b/api/openshift/bc.yaml index 97dc78bdb..2cae8b07e 100644 --- a/api/openshift/bc.yaml +++ b/api/openshift/bc.yaml @@ -1,4 +1,4 @@ -apiVersion: v1 +apiVersion: template.openshift.io/v1 kind: Template parameters: - suffix: diff --git a/api/openshift/db.bc.yaml b/api/openshift/db.bc.yaml index c6ec55e98..77d0981c4 100644 --- a/api/openshift/db.bc.yaml +++ b/api/openshift/db.bc.yaml @@ -1,6 +1,6 @@ --- kind: Template -apiVersion: v1 +apiVersion: template.openshift.io/v1 metadata: name: postgresql creationTimestamp: null diff --git a/api/openshift/db.dc.yaml b/api/openshift/db.dc.yaml index da029c083..3f91fe5ef 100644 --- a/api/openshift/db.dc.yaml +++ b/api/openshift/db.dc.yaml @@ -1,4 +1,4 @@ -apiVersion: v1 +apiVersion: template.openshift.io/v1 kind: Template labels: template: postgresql-persistent-template diff --git a/api/openshift/dc.yaml b/api/openshift/dc.yaml index 3709e4cd4..5012ee3ac 100644 --- a/api/openshift/dc.yaml +++ b/api/openshift/dc.yaml @@ -1,4 +1,4 @@ -apiVersion: v1 +apiVersion: template.openshift.io/v1 objects: - apiVersion: image.openshift.io/v1 kind: ImageStream @@ -270,7 +270,7 @@ parameters: - name: CERTIFICATE_URL description: Authentication certificate urls required: true - value: "https://oidc.gov.bc.ca/auth/realms/dfmlcg7z/protocol/openid-connect/certs" + value: "https://loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/certs" - name: CPU_REQ value: '500m' - name: CPU_LIMIT diff --git a/api/openshift/is.api.yaml b/api/openshift/is.api.yaml index d2cdb855a..a3d2d7f15 100644 --- a/api/openshift/is.api.yaml +++ b/api/openshift/is.api.yaml @@ -1,4 +1,4 @@ -apiVersion: v1 +apiVersion: template.openshift.io/v1 parameters: - name: NAME value: invasivesbc-api-setup diff --git a/api/openshift/seed.pod.yaml b/api/openshift/seed.pod.yaml index fb374c739..6f8cd4d37 100644 --- a/api/openshift/seed.pod.yaml +++ b/api/openshift/seed.pod.yaml @@ -1,5 +1,5 @@ kind: Template -apiVersion: v1 +apiVersion: template.openshift.io/v1 metadata: name: seed creationTimestamp: null @@ -28,7 +28,7 @@ parameters: - name: CERTIFICATE_URL description: Authentication certificate urls required: true - value: "https://oidc.gov.bc.ca/auth/realms/dfmlcg7z/protocol/openid-connect/certs" + value: "https://loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/certs" - name: CPU_REQ value: '500m' - name: CPU_LIMIT diff --git a/api/openshift/setup.pod.yaml b/api/openshift/setup.pod.yaml index 5e9936f60..eab274a79 100644 --- a/api/openshift/setup.pod.yaml +++ b/api/openshift/setup.pod.yaml @@ -1,5 +1,5 @@ kind: Template -apiVersion: v1 +apiVersion: template.openshift.io/v1 metadata: name: migration creationTimestamp: null @@ -28,7 +28,7 @@ parameters: - name: CERTIFICATE_URL description: Authentication certificate urls required: true - value: "https://oidc.gov.bc.ca/auth/realms/dfmlcg7z/protocol/openid-connect/certs" + value: "https://loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/certs" - name: CPU_REQ value: '500m' - name: CPU_LIMIT diff --git a/api/openshift/test.pod.yaml b/api/openshift/test.pod.yaml index 1adb01446..45c5d28fa 100644 --- a/api/openshift/test.pod.yaml +++ b/api/openshift/test.pod.yaml @@ -1,5 +1,5 @@ kind: Template -apiVersion: v1 +apiVersion: template.openshift.io/v1 metadata: name: test creationTimestamp: null @@ -28,7 +28,7 @@ parameters: - name: CERTIFICATE_URL description: Authentication certificate urls required: true - value: "https://oidc.gov.bc.ca/auth/realms/dfmlcg7z/protocol/openid-connect/certs" + value: "https://loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/certs" - name: CPU_REQ value: '500m' - name: CPU_LIMIT diff --git a/api/openshift/tools/metabase/README.md b/api/openshift/tools/metabase/README.md index 06b6395e1..959591f4b 100644 --- a/api/openshift/tools/metabase/README.md +++ b/api/openshift/tools/metabase/README.md @@ -35,4 +35,4 @@ Once Metabase is up and functional (this will take between 3 to 5 minutes), you ## Notes -In general, Metabase should generally take up very little CPU (<0.01 cores) and float between 700 to 800mb of memory usage during operation. The template has some reasonable requests and limits set for both CPU and Memory, but you may change it should your needs be different. For some more documentation referencees, you may refer [here](https://github.com/loneil/domo-metabase-viewer/tree/master/docs) for historical templates and tutorials, or inspect the official Metabase documentation [here](https://www.metabase.com/docs/latest/). +In general, Metabase should generally take up very little CPU (<0.01 cores) and float between 700 to 800mb of memory usage during operation. The template has some reasonable requests and limits set for both CPU and Memory, but you may change it should your needs be different. For some more documentation references, you may refer [here](https://github.com/loneil/domo-metabase-viewer/tree/master/docs) for historical templates and tutorials, or inspect the official Metabase documentation [here](https://www.metabase.com/docs/latest/). diff --git a/api/openshift/tools/schemaspy.dc.yaml b/api/openshift/tools/schemaspy.dc.yaml index 58c55ed96..dbeb6985f 100644 --- a/api/openshift/tools/schemaspy.dc.yaml +++ b/api/openshift/tools/schemaspy.dc.yaml @@ -1,5 +1,5 @@ kind: Template -apiVersion: v1 +apiVersion: template.openshift.io/v1 metadata: name: "${NAME}-dc" annotations: diff --git a/api/package-lock.json b/api/package-lock.json new file mode 100644 index 000000000..48e341a09 --- /dev/null +++ b/api/package-lock.json @@ -0,0 +1,3 @@ +{ + "lockfileVersion": 1 +} diff --git a/app/README.md b/app/README.md index 12f0346ee..f0d6f7918 100644 --- a/app/README.md +++ b/app/README.md @@ -1,61 +1,3 @@ -# invasives BC - Invasive species management tools (ISMT) - Web App +# Invasive Mussels BC - iOS app -This is the application source code for the client web app of the invasive species project. - -This client was initially generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.3.2. - -To get help on Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). - -## Setting Up -### Requirements - -If you wish to use the Makefile commands to run the project with Docker from the `api` directory, there are no additional requirements required for local development. - -If you wish to run the application locally without Docker, you will need to install [Angular CLI](https://github.com/angular/angular-cli). - -## Running the Application - -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. - -Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. - -Note you will also need to have the backend server running to connect to. See the [Server Readme](api/README.md) for details. - -## Closing the Application - -To quit the local client, type ` + C`. - -## Deployment to OpenShift - -Use command `oc` for local OpenShift build and deployment options. - -## Running Tests - -Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). - -Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). - -Run `ng build-storybook` followed by `ng storybook` to build and run tests via [Storybook](https://storybook.js.org/). Output is visible on port 6006. - -## Code Analysis with SonarQube - -Run `npm run sonar-analysis` to see output from [SonarQube](https://www.sonarqube.org/). - -## Code scaffolding - -Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. - -## Cypress -Cypress is a frontend testing tool built for the modern web. It comes with a lot of built-in features to support cross browser testing, snapshots, etc. See the documentation for more about [Cypress](https://docs.cypress.io/guides/overview/why-cypress.html#In-a-nutshell) - -With Cypress, it is easy to do all the following -- Unit tests -- E2E tests -- Integration tests - -All the test related files are kept under the folder `app/lucy/cypress`. The folder structure is as follows -- `fixtures` - to store all the fixtures(resources) that are required for testing -- `integration` - test cases for each module are kept in this directory -- `plugins` - to load all the plugins and also a good place to modify env variable values dynamically based on the different environments -- `support` - additional content to support/extend the capabilities of Cypress -- `typings` - contains all the typings +The information for getting started with the Inspect iOS app can be found on the [InvasivesBC-mussels-iOS repo here](https://github.com/bcgov/invasivesBC-mussels-iOS/blob/master/README.md). diff --git a/app/cypress-e2e/sample.cypress.env.json b/app/cypress-e2e/sample.cypress.env.json index 5fe263805..67768ede6 100644 --- a/app/cypress-e2e/sample.cypress.env.json +++ b/app/cypress-e2e/sample.cypress.env.json @@ -1,8 +1,8 @@ { "username": "cypress", "password": "PASSWORD", - "authRealm": "dfmlcg7z", - "authClientId": "invasives-bc", + "authRealm": "standard", + "authClientId": "inspect-bc-mussels-4817", "host": "http://localhost:3033", "authUrl": "VALUE" } \ No newline at end of file diff --git a/app/docker-compose.yml b/app/docker-compose.yml index a3d581293..43ae56c36 100644 --- a/app/docker-compose.yml +++ b/app/docker-compose.yml @@ -5,13 +5,14 @@ services: container_name: "lucy-web" build: context: ./lucy - dockerfile: .build/Dockerfile.local + dockerfile: Dockerfile ports: - 3030:3030 networks: - web-net + volumes: + - ./lucy:/opt/app-root/src networks: web-net: driver: bridge name: lucy-web-network - \ No newline at end of file diff --git a/app/lucy/.build/Dockerfile.npm b/app/lucy/.build/Dockerfile.npm index c492c2848..47f5bf087 100644 --- a/app/lucy/.build/Dockerfile.npm +++ b/app/lucy/.build/Dockerfile.npm @@ -1,7 +1,7 @@ FROM node:10 RUN apt-get -qq update -RUN npm install -g npm +RUN npm install -g npm@6.14.12 # Create app directory ENV HOME_ROOT=/opt/app-root/src diff --git a/app/lucy/Dockerfile b/app/lucy/Dockerfile index 129f93172..91253172e 100644 --- a/app/lucy/Dockerfile +++ b/app/lucy/Dockerfile @@ -1,4 +1,4 @@ -FROM node:10 +FROM node:14.21.3 # Setting Path ENV PATH /opt/rh/rh-nodejs8/root/usr/bin:/opt/app-root/src/node_modules/.bin/:/opt/app-root/src/app.npm-global/bin/:/opt/app-root/src/app/bin:/opt/app-root/src/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin @@ -20,13 +20,13 @@ WORKDIR /opt/app-root/src # where available (npm@5+) # COPY PACKAGE JSON COPY ./package*.json ./ - -# INSATLL NODE DEPENDENCIES -RUN npm ci +RUN npm install @angular/cli@15.1.0 # Copy All the sources -COPY ./ . +COPY . . +# INSTALL NODE DEPENDENCIES +RUN npm ci # BUILD APP RUN npm run build-prod @@ -36,4 +36,4 @@ RUN npm run build-prod EXPOSE 3030 # RUN APP -CMD ["npm", "run", "deploy_start"] +CMD ["npm", "run", "deploy_run"] diff --git a/app/lucy/package-lock.json b/app/lucy/package-lock.json index 1da1c6db1..4662248d7 100644 --- a/app/lucy/package-lock.json +++ b/app/lucy/package-lock.json @@ -40,7 +40,7 @@ "loader-utils": "1.2.3", "mini-css-extract-plugin": "0.5.0", "minimatch": "3.0.4", - "node-sass": "4.13.1", + "sass": "1.69.7", "open": "6.0.0", "parse5": "4.0.0", "postcss": "7.0.14", @@ -9943,6 +9943,11 @@ "integrity": "sha512-O3sR1/opvCDGLEVcvrGTMtLac8GJ5IwZC4puPrLuRj3l7ICKvkmA0vGuU9OW8mV9WIBRnaxp5GJh9IEAaNOoYg==", "dev": true }, + "immutable": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz", + "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==" + }, "import-cwd": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz", @@ -13134,8 +13139,7 @@ "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" }, "pify": { "version": "4.0.1", @@ -15194,6 +15198,106 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "sass": { + "version": "1.69.7", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.7.tgz", + "integrity": "sha512-rzj2soDeZ8wtE2egyLXgOOHQvaC2iosZrkF6v3EUG+tBwEvhqUCzm0VP3k9gHF9LXbSrRhT5SksoI56Iw8NPnQ==", + "requires": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "dependencies": { + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "optional": true + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "requires": { + "is-glob": "^4.0.1" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "requires": { + "picomatch": "^2.2.1" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + } + } + }, "sass-graph": { "version": "2.2.6", "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.6.tgz", @@ -16220,6 +16324,11 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, + "source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==" + }, "source-map-loader": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-0.2.4.tgz", diff --git a/app/lucy/package.json b/app/lucy/package.json index 639e36b28..08fa69a64 100644 --- a/app/lucy/package.json +++ b/app/lucy/package.json @@ -10,7 +10,7 @@ "test": "ng test --watch=false", "lint": "ng lint", "e2e": "ng e2e", - "deploy_run": "ng serve --host 0.0.0.0 --port 3030 --disableHostCheck", + "deploy_run": "ng serve --poll 2000 --host 0.0.0.0 --port 3030 --disable-host-check", "deploy_start": "node server", "storybook": "start-storybook -p 6006", "build-storybook": "build-storybook", @@ -58,6 +58,7 @@ "popper.js": "^1.15.0", "request": "^2.88.0", "rxjs": "~6.3.3", + "sass": "1.69.7", "terser-webpack-plugin": "^2.1.0", "tslib": "^1.9.0", "web-animations-js": "^2.3.2", diff --git a/app/lucy/src/app/constants/app-constants.ts b/app/lucy/src/app/constants/app-constants.ts index 3f1412c26..7033449a2 100755 --- a/app/lucy/src/app/constants/app-constants.ts +++ b/app/lucy/src/app/constants/app-constants.ts @@ -16,12 +16,13 @@ * Created by Amir Shayegh on 2019-10-23. */ +import { encryptStringWithSHA256, getRandomString, hashToBase64url } from "../utils/helpers"; + /** * @description Advance declare window obj */ declare var window: any; export class AppConstants { - // Mussles App static get API_WatercraftAssessment_Export(): string { return `${AppConstants.API_baseURL}/mussels/wra/export`;} static get API_Shift_Export(): string { return `${AppConstants.API_baseURL}/mussels/workflow/export`;} @@ -63,16 +64,39 @@ export class AppConstants { // API Reference data static get API_Roles(): string { return `${AppConstants.API_baseURL}/account/roles`; } + static getAuthorizationParams = async() => { + // Create random "state" + const state = getRandomString(); + const nonce = getRandomString(); + sessionStorage.setItem('oauth_state', state); + sessionStorage.setItem('oidc_nonce', nonce); + + // Create PKCE Code Verifier + const code_verifier = getRandomString(); + sessionStorage.setItem('code_verifier', code_verifier); + + // Create PKCE Code Challenge + const arrayHash: any = await encryptStringWithSHA256(code_verifier); + const code_challenge = hashToBase64url(arrayHash); + sessionStorage.setItem('code_challenge', code_challenge); + + return { code_challenge, state, nonce }; + }; + + // PKCE Verifier + static CODE_VERIFIER = getRandomString(); + // SSO static SSOConstants = { - SSO_CLIENT_ID : `invasives-bc`, - SSO_BASE_URL : `https://dev.oidc.gov.bc.ca`, - SSO_REALM_NAME : `dfmlcg7z`, + SSO_CLIENT_ID : `inspect-bc-mussels-4817`, + SSO_BASE_URL : `https://dev.loginproxy.gov.bc.ca`, + SSO_REALM_NAME : `standard`, SSO_LOGIN_REDIRECT_URI : `http://${window.location.host}`, + SSO_CODE_CHALLENGE_METHOD : `S256`, }; // API - static API_baseURL = 'http://localhost:80/api'; + static API_baseURL = 'http://localhost:7070/api'; // Default Config static CONFIG = { @@ -118,13 +142,15 @@ export class AppConstants { static API_observationChemicallyTreated(): string { return `${AppConstants.API_baseURL}/obschem`; } // SSO non static endpoints - static SSO_LoginEndpoint(): string { - const baseAuthEndpoint = `${this.SSOConstants.SSO_BASE_URL}/auth/realms/${this.SSOConstants.SSO_REALM_NAME}/protocol/openid-connect`; - return `${baseAuthEndpoint}/auth?response_type=code&client_id=${this.SSOConstants.SSO_CLIENT_ID}&redirect_uri=${this.SSOConstants.SSO_LOGIN_REDIRECT_URI}`; + static SSO_LoginEndpoint = async() => { + AppConstants.getAuthorizationParams().then((authorizationParams) => { + const baseAuthEndpoint = `${AppConstants.SSOConstants.SSO_BASE_URL}/auth/realms/${AppConstants.SSOConstants.SSO_REALM_NAME}/protocol/openid-connect`; + return `${baseAuthEndpoint}/auth?response_type=code&client_id=${AppConstants.SSOConstants.SSO_CLIENT_ID}&redirect_uri=${AppConstants.SSOConstants.SSO_LOGIN_REDIRECT_URI}&code_challenge_method=${AppConstants.SSOConstants.SSO_CODE_CHALLENGE_METHOD}&code_challenge=${encodeURIComponent(authorizationParams.code_challenge)}&state=${encodeURIComponent(authorizationParams.state)}&nonce=${encodeURIComponent(authorizationParams.nonce)}`; + }) } static SSO_TokenEndpoint(): string { - return `${this.SSOConstants.SSO_BASE_URL}/auth/realms/${this.SSOConstants.SSO_REALM_NAME}/protocol/openid-connect/token`; + return `${AppConstants.SSOConstants.SSO_BASE_URL}/auth/realms/${AppConstants.SSOConstants.SSO_REALM_NAME}/protocol/openid-connect/token`; } // API Non static endpoints diff --git a/app/lucy/src/app/services/bootstrap.service.ts b/app/lucy/src/app/services/bootstrap.service.ts index 83d4b9575..b5d652138 100644 --- a/app/lucy/src/app/services/bootstrap.service.ts +++ b/app/lucy/src/app/services/bootstrap.service.ts @@ -29,7 +29,7 @@ export class AppBootService { // Get config const result: any = await this.api.get('/config').toPromise(); // Get API host - const host = result.apiHost || 'localhost:80'; + const host = result.apiHost || 'localhost:7070'; // Create base url const baseURL = `${location.protocol}//${host}/api`; // Setting base url to API const diff --git a/app/lucy/src/app/services/sso.service.ts b/app/lucy/src/app/services/sso.service.ts index 2af63b3f1..b6aaeae2c 100644 --- a/app/lucy/src/app/services/sso.service.ts +++ b/app/lucy/src/app/services/sso.service.ts @@ -67,12 +67,12 @@ export class SsoService { /***** Computed variables *****/ - /** - * Return Login endpoint by concatenating Constants from AppConstants -> SSOConstants - */ + /** + * Return Login endpoint by concatenating Constants from AppConstants -> SSOConstants + */ private SSO_LoginEndpoint(): string { const baseAuthEndpoint = `${AppConstants.SSOConstants.SSO_BASE_URL}/auth/realms/${AppConstants.SSOConstants.SSO_REALM_NAME}/protocol/openid-connect`; - return `${baseAuthEndpoint}/auth?response_type=code&client_id=${AppConstants.SSOConstants.SSO_CLIENT_ID}&redirect_uri=${AppConstants.SSOConstants.SSO_LOGIN_REDIRECT_URI}`; + return `${baseAuthEndpoint}/auth?response_type=code&client_id=${AppConstants.SSOConstants.SSO_CLIENT_ID}&redirect_uri=${AppConstants.SSOConstants.SSO_LOGIN_REDIRECT_URI}&code_challenge_method=${AppConstants.SSOConstants.SSO_CODE_CHALLENGE_METHOD}`; } private SSO_idirLoginEndpoint(): string { @@ -213,22 +213,23 @@ export class SsoService { * THe route will include a code that we will use in getToken() to get the user's token * @param provider SSOLoginProvider */ - public login(provider: SSOLoginProvider) { - switch (provider) { - case SSOLoginProvider.idir: { - window.open(this.SSO_idirLoginEndpoint(), `_self`); - break; - } - case SSOLoginProvider.BCeID: { - window.open(this.SSO_BCeidLoginEndpoint(), `_self`); - break; + public async login(provider: SSOLoginProvider) { + AppConstants.getAuthorizationParams().then((authorizationParams) => { + switch (provider) { + case SSOLoginProvider.idir: { + window.open(`${this.SSO_idirLoginEndpoint()}&code_challenge=${encodeURIComponent(authorizationParams.code_challenge)}&state=${encodeURIComponent(authorizationParams.state)}&nonce=${encodeURIComponent(authorizationParams.nonce)}`, `_self`); + break; + } + case SSOLoginProvider.BCeID: { + window.open(`${this.SSO_BCeidLoginEndpoint()}&code_challenge=${encodeURIComponent(authorizationParams.code_challenge)}&state=${encodeURIComponent(authorizationParams.state)}&nonce=${encodeURIComponent(authorizationParams.nonce)}`, `_self`); + break; + } + default: { + window.open(`${this.SSO_LoginEndpoint()}&code_challenge=${encodeURIComponent(authorizationParams.code_challenge)}&state=${encodeURIComponent(authorizationParams.state)}&nonce=${encodeURIComponent(authorizationParams.nonce)}`, `_self`); + break; + } } - default: { - console.log(`where am i`); - window.open(this.SSO_LoginEndpoint(), `_self`); - break; - } - } + }); } /** @@ -299,7 +300,11 @@ export class SsoService { } private getTokensFromAPIResult(result: any): TokenReponse | undefined { - if (result['success'] === false) { + // PKCE Validation + const oidc_nonce = sessionStorage.getItem('oidc_nonce'); + const tokenNonce = jwtDecode(result.refresh_token)['nonce']; + + if (!result['success'] || oidc_nonce !== tokenNonce) { return undefined; } else { const accessToken = result['access_token']; @@ -307,6 +312,10 @@ export class SsoService { const newRefreshToken = result['refresh_token']; const newRefreshTokenExpiery = result['refresh_expires_in']; + sessionStorage.removeItem('oauth_state'); + sessionStorage.removeItem('code_verifier'); + sessionStorage.removeItem('code_challenge'); + if (!accessToken || !expiresIn || !newRefreshToken || !newRefreshTokenExpiery) { console.log('response doesnt have all required data'); return undefined; @@ -409,6 +418,7 @@ export class SsoService { grant_type: 'authorization_code', redirect_uri: AppConstants.SSOConstants.SSO_LOGIN_REDIRECT_URI, client_id: AppConstants.SSOConstants.SSO_CLIENT_ID, + code_verifier: sessionStorage.getItem('code_verifier') }; const response: TokenReponse = { diff --git a/app/lucy/src/app/utils/helpers.ts b/app/lucy/src/app/utils/helpers.ts new file mode 100644 index 000000000..797e8b5de --- /dev/null +++ b/app/lucy/src/app/utils/helpers.ts @@ -0,0 +1,25 @@ +// Generate a Random String +export const getRandomString = () => { + const randomItems = new Uint32Array(28); + crypto.getRandomValues(randomItems); + const binaryStringItems: string[] = []; + randomItems.forEach((dec) => binaryStringItems.push(`0${dec.toString(16).substr(-2)}`)); + return binaryStringItems.reduce((acc: string, item: string) => `${acc}${item}`, ''); +}; + +// Encrypt a String with SHA256 +export const encryptStringWithSHA256 = async (str: string) => { + const PROTOCOL = 'SHA-256'; + const textEncoder = new TextEncoder(); + const encodedData = textEncoder.encode(str); + return crypto.subtle.digest(PROTOCOL, encodedData); +}; + +// Convert Hash to Base64-URL +export const hashToBase64url = (arrayBuffer: Iterable) => { + const items = new Uint8Array(arrayBuffer); + const stringifiedArrayHash = items.reduce((acc, i) => `${acc}${String.fromCharCode(i)}`, ''); + const decodedHash = btoa(stringifiedArrayHash); + + return decodedHash.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''); +}; diff --git a/app/openshift/app.bc.json b/app/openshift/app.bc.json index b991ceb6e..531529b37 100644 --- a/app/openshift/app.bc.json +++ b/app/openshift/app.bc.json @@ -1,5 +1,5 @@ { - "apiVersion": "v1", + "apiVersion": "template.openshift.io/v1", "kind": "Template", "metadata": { "creationTimestamp": null, diff --git a/app/openshift/app.bc.yaml b/app/openshift/app.bc.yaml index 4c181f97a..14c2d1121 100644 --- a/app/openshift/app.bc.yaml +++ b/app/openshift/app.bc.yaml @@ -1,4 +1,4 @@ -apiVersion: v1 +apiVersion: template.openshift.io/v1 kind: Template metadata: creationTimestamp: null @@ -30,13 +30,13 @@ parameters: value: dev - name: SOURCE_IMAGE_NAME required: true - value: redhat-ubi-node-10 + value: node - name: SOURCE_IMAGE_TAG required: true - value: 1-41 + value: 14.21.3 - name: BASE_IMAGE_URL required: true - value: registry.access.redhat.com/ubi8/nodejs-10:1-41 + value: node:14.21.3 objects: - kind: ImageStream apiVersion: v1 @@ -111,4 +111,4 @@ objects: - type: ConfigChange - type: ImageChange status: - lastVersion: 7 \ No newline at end of file + lastVersion: 7 diff --git a/app/openshift/app.dc.yaml b/app/openshift/app.dc.yaml index ead73c703..ccd247d27 100644 --- a/app/openshift/app.dc.yaml +++ b/app/openshift/app.dc.yaml @@ -1,4 +1,4 @@ -apiVersion: v1 +apiVersion: template.openshift.io/v1 objects: - apiVersion: image.openshift.io/v1 kind: ImageStream @@ -233,15 +233,15 @@ parameters: value: '2Gi' - name: SSO_URL description: Key clock login url - value: 'https://oidc.gov.bc.ca' + value: 'https://loginproxy.gov.bc.ca' - name: SSO_CLIENT_ID description: Client Id for application - value: "lucy" + value: "inspect-bc-mussels-4817" - name: SSO_REALM description: Realm identifier or name - value: dfmlcg7z + value: standard - name: REPLICAS value: '1' - name: REPLICA_MAX required: true - value: '1' \ No newline at end of file + value: '1' diff --git a/env_config/env.docker b/env_config/env.docker index d5c705060..4deddd36e 100644 --- a/env_config/env.docker +++ b/env_config/env.docker @@ -44,8 +44,8 @@ DB_SCHEMA=invasivesbc # ------------------------------------------------------------------------------ # KeyClock URLS # ------------------------------------------------------------------------------ -APP_CERTIFICATE_URL=https://dev.oidc.gov.bc.ca/auth/realms/dfmlcg7z/protocol/openid-connect/certs -APP_CERTIFICATE_URL_TEST=https://oidc.gov.bc.ca/auth/realms/dfmlcg7z/protocol/openid-connect/certs +APP_CERTIFICATE_URL=https://dev.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/certs +APP_CERTIFICATE_URL_TEST=https://dev.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/certs # ------------------------------------------------------------------------------ # Mailer Config diff --git a/loadTest/README.md b/loadTest/README.md index 1b86006e2..b1da36d66 100644 --- a/loadTest/README.md +++ b/loadTest/README.md @@ -25,9 +25,9 @@ The __/loadTest__ directory under root contains all resources and source code fi TEST_USER=#NAME PASSWORD=#PWD # Keycloak auth details - AUTH_URL=https://dev.oidc.gov.bc.ca/auth/realms - REALM=dfmlcg7z - CLIENT_ID=invasives-bc + AUTH_URL=https://dev.loginproxy.gov.bc.ca/auth/realms + REALM=standard + CLIENT_ID=inspect-bc-mussels-4817 ``` ## Run test locally diff --git a/loadTest/app/env.example b/loadTest/app/env.example index b61ddc5fe..9c3875799 100644 --- a/loadTest/app/env.example +++ b/loadTest/app/env.example @@ -2,6 +2,6 @@ TEST_USER=#NAME PASSWORD=#PWD # Keycloak auth details -AUTH_URL=https://dev.oidc.gov.bc.ca/auth/realms -REALM=dfmlcg7z -CLIENT_ID=invasives-bc \ No newline at end of file +AUTH_URL=https://dev.loginproxy.gov.bc.ca/auth/realms +REALM=standard +CLIENT_ID=inspect-bc-mussels-4817 diff --git a/loadTest/openshift/job.yml b/loadTest/openshift/job.yml index 013d733dc..4e00381c3 100644 --- a/loadTest/openshift/job.yml +++ b/loadTest/openshift/job.yml @@ -20,10 +20,10 @@ parameters: value: "0" - name: AUTH_URL description: Auth URL - value: "https://test.oidc.gov.bc.ca/auth/realms" + value: "https://dev.loginproxy.gov.bc.ca/auth/realms" - name: REALM description: Auth Realm - value: dfmlcg7z + value: standard - name: TEST_USER_SECRET description: Secret of test user profile value: invasivesbc-load-test-user diff --git a/loadTest/openshift/pod.yml b/loadTest/openshift/pod.yml index 79df70398..f6758eaa7 100644 --- a/loadTest/openshift/pod.yml +++ b/loadTest/openshift/pod.yml @@ -19,10 +19,10 @@ parameters: value: "0" - name: AUTH_URL description: Auth URL - value: "https://test.oidc.gov.bc.ca/auth/realms" + value: "https://dev.loginproxy.gov.bc.ca/auth/realms" - name: REALM description: Auth Realm - value: dfmlcg7z + value: standard - name: TEST_USER_SECRET description: Secret of test user profile value: invasivesbc-load-test-user diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..48e341a09 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,3 @@ +{ + "lockfileVersion": 1 +} diff --git a/testing/integration/postman/DEV.postman_environment.json b/testing/integration/postman/DEV.postman_environment.json index df4a18ec2..9a0626c34 100644 --- a/testing/integration/postman/DEV.postman_environment.json +++ b/testing/integration/postman/DEV.postman_environment.json @@ -4,7 +4,7 @@ "values": [ { "key": "auth_host", - "value": "https://dev.oidc.gov.bc.ca", + "value": "https://dev.loginproxy.gov.bc.ca", "enabled": true }, { @@ -39,7 +39,7 @@ }, { "key": "KEYCLOAK_URL", - "value": "https://dev.oidc.gov.bc.ca/auth/realms/dfmlcg7z/protocol/openid-connect/token", + "value": "https://dev.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/token", "enabled": true }, { diff --git a/testing/integration/postman/lucy-api-mobile.postman_collection.json b/testing/integration/postman/lucy-api-mobile.postman_collection.json index f9b2bc57c..b32e193e5 100644 --- a/testing/integration/postman/lucy-api-mobile.postman_collection.json +++ b/testing/integration/postman/lucy-api-mobile.postman_collection.json @@ -1014,7 +1014,7 @@ "protocolProfileBehavior": {} }, { - "name": "https://dev.oidc.gov.bc.ca/auth/realms/dfmlcg7z/protocol/openid-connect/token", + "name": "https://dev.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/token", "event": [ { "listen": "test", @@ -1051,7 +1051,7 @@ }, { "key": "client_id", - "value": "invasives-bc", + "value": "inspect-bc-mussels-4817", "type": "text" }, { @@ -1072,7 +1072,7 @@ ] }, "url": { - "raw": "https://dev.oidc.gov.bc.ca/auth/realms/dfmlcg7z/protocol/openid-connect/token", + "raw": "https://dev.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/token", "protocol": "https", "host": [ "sso-dev", @@ -1084,7 +1084,7 @@ "path": [ "auth", "realms", - "dfmlcg7z", + "standard", "protocol", "openid-connect", "token" @@ -1112,7 +1112,7 @@ "type": "text/javascript", "exec": [ "const echoPostRequest = {", - " url: 'https://dev.oidc.gov.bc.ca/auth/realms/dfmlcg7z/protocol/openid-connect/token',", + " url: 'https://dev.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/token',", " method: 'POST',", " header: 'Content-Type:application/x-www-form-urlencoded',", " body: {", @@ -1121,7 +1121,7 @@ " {key:'username', value:'istest1@idir'}, ", " {key:'password', value:pm.environment.get('postman_pw')}, ", " {key:'scope', value:'openid'}, ", - " {key:'client_id', value:'invasives-bc'}, ", + " {key:'client_id', value:'inspect-bc-mussels-4817'}, ", " {key:'grant_type', value:'password'}", " ]", " }",