-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add latLng for explicit Feed geo point (#154)
* Add longitudeLatitude field to feed - json of 'lng' and 'lat' to make it more explicit * Fix small type error * Add longitudeLatitude to Player type * Update variable name, seeds, and add admin account on seed * Blank commit to trigger github actions * Update ui/src/components/MapLayout.tsx Co-authored-by: Paul Cretu <paul.s.cretu@gmail.com> * `latitudeLongitude` -> `latLng` * Update user admin creation * Finish swapping around lat and lng * array -> property accessor * Add types for latLng * Make locationPoint non-nil --------- Co-authored-by: Paul Cretu <paul.s.cretu@gmail.com>
- Loading branch information
Showing
15 changed files
with
194 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,6 @@ export const GET_FEED = gql` | |
name | ||
slug | ||
nodeName | ||
locationPoint | ||
introHtml | ||
thumbUrl | ||
mapUrl | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
server/priv/repo/migrations/20230728032134_make_location_point_non_nil.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
defmodule Orcasite.Repo.Migrations.MakeLocationPointNonNil do | ||
@moduledoc """ | ||
Updates resources based on their most recent snapshots. | ||
This file was autogenerated with `mix ash_postgres.generate_migrations` | ||
""" | ||
|
||
use Ecto.Migration | ||
|
||
def up do | ||
alter table(:feeds) do | ||
modify :location_point, :geometry, null: false | ||
end | ||
end | ||
|
||
def down do | ||
alter table(:feeds) do | ||
modify :location_point, :geometry, null: true | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
server/priv/resource_snapshots/repo/feeds/20230728032135.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{ | ||
"attributes": [ | ||
{ | ||
"default": "nil", | ||
"size": null, | ||
"type": "bigint", | ||
"source": "id", | ||
"references": null, | ||
"allow_nil?": false, | ||
"primary_key?": true, | ||
"generated?": true | ||
}, | ||
{ | ||
"default": "nil", | ||
"size": null, | ||
"type": "text", | ||
"source": "name", | ||
"references": null, | ||
"allow_nil?": true, | ||
"primary_key?": false, | ||
"generated?": false | ||
}, | ||
{ | ||
"default": "nil", | ||
"size": null, | ||
"type": "text", | ||
"source": "node_name", | ||
"references": null, | ||
"allow_nil?": true, | ||
"primary_key?": false, | ||
"generated?": false | ||
}, | ||
{ | ||
"default": "nil", | ||
"size": null, | ||
"type": "text", | ||
"source": "slug", | ||
"references": null, | ||
"allow_nil?": true, | ||
"primary_key?": false, | ||
"generated?": false | ||
}, | ||
{ | ||
"default": "nil", | ||
"size": null, | ||
"type": "geometry", | ||
"source": "location_point", | ||
"references": null, | ||
"allow_nil?": false, | ||
"primary_key?": false, | ||
"generated?": false | ||
}, | ||
{ | ||
"default": "fragment(\"now()\")", | ||
"size": null, | ||
"type": "utc_datetime_usec", | ||
"source": "inserted_at", | ||
"references": null, | ||
"allow_nil?": false, | ||
"primary_key?": false, | ||
"generated?": false | ||
}, | ||
{ | ||
"default": "fragment(\"now()\")", | ||
"size": null, | ||
"type": "utc_datetime_usec", | ||
"source": "updated_at", | ||
"references": null, | ||
"allow_nil?": false, | ||
"primary_key?": false, | ||
"generated?": false | ||
} | ||
], | ||
"table": "feeds", | ||
"hash": "CFF5AB9134C541B23476FBE8EEE1739B188560E3D2BBC8E5B318F60127E90B06", | ||
"repo": "Elixir.Orcasite.Repo", | ||
"identities": [ | ||
{ | ||
"name": "unique_slug", | ||
"keys": [ | ||
"slug" | ||
], | ||
"base_filter": null, | ||
"index_name": "feeds_unique_slug_index" | ||
} | ||
], | ||
"schema": null, | ||
"multitenancy": { | ||
"global": null, | ||
"attribute": null, | ||
"strategy": null | ||
}, | ||
"base_filter": null, | ||
"check_constraints": [], | ||
"custom_indexes": [], | ||
"custom_statements": [], | ||
"has_create_action": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.