-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(map): adds hasura configuration layers and features
- Loading branch information
1 parent
bdca12b
commit 11547ee
Showing
11 changed files
with
112 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
table: | ||
name: features | ||
schema: public | ||
object_relationships: | ||
- name: layer | ||
using: | ||
foreign_key_constraint_on: layer_id | ||
insert_permissions: | ||
- role: editor | ||
permission: | ||
check: {} | ||
columns: | ||
- created_at | ||
- geometry | ||
- id | ||
- layer_id | ||
- properties | ||
select_permissions: | ||
- role: editor | ||
permission: | ||
columns: | ||
- created_at | ||
- deleted_at | ||
- geometry | ||
- id | ||
- layer_id | ||
- properties | ||
- updated_at | ||
filter: {} | ||
- role: viewer | ||
permission: | ||
columns: | ||
- created_at | ||
- deleted_at | ||
- geometry | ||
- id | ||
- layer_id | ||
- properties | ||
- updated_at | ||
filter: {} | ||
update_permissions: | ||
- role: editor | ||
permission: | ||
columns: | ||
- created_at | ||
- deleted_at | ||
- geometry | ||
- id | ||
- properties | ||
- updated_at | ||
filter: {} | ||
check: null |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
table: | ||
name: layers | ||
schema: public | ||
object_relationships: | ||
- name: incident | ||
using: | ||
foreign_key_constraint_on: incident_id | ||
array_relationships: | ||
- name: features | ||
using: | ||
foreign_key_constraint_on: | ||
column: layer_id | ||
table: | ||
name: features | ||
schema: public | ||
insert_permissions: | ||
- role: editor | ||
permission: | ||
check: {} | ||
columns: | ||
- incident_id | ||
- name | ||
select_permissions: | ||
- role: editor | ||
permission: | ||
columns: | ||
- id | ||
- name | ||
filter: {} | ||
- role: viewer | ||
permission: | ||
columns: | ||
- id | ||
- name | ||
filter: {} | ||
update_permissions: | ||
- role: editor | ||
permission: | ||
columns: | ||
- name | ||
filter: {} | ||
check: null |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
1 change: 1 addition & 0 deletions
1
migrations/Postgres/1706705955292_create_table_public_layers/down.sql
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 @@ | ||
DROP TABLE "public"."layers"; |
2 changes: 2 additions & 0 deletions
2
migrations/Postgres/1706705955292_create_table_public_layers/up.sql
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,2 @@ | ||
CREATE TABLE "public"."layers" ("id" uuid NOT NULL DEFAULT gen_random_uuid(), "incident" uuid NOT NULL, "name" text NOT NULL, PRIMARY KEY ("id") , FOREIGN KEY ("incident") REFERENCES "public"."incidents"("id") ON UPDATE restrict ON DELETE restrict, UNIQUE ("id")); | ||
CREATE EXTENSION IF NOT EXISTS pgcrypto; |
1 change: 1 addition & 0 deletions
1
migrations/Postgres/1706706252027_create_table_public_features/down.sql
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 @@ | ||
DROP TABLE "public"."features"; |
2 changes: 2 additions & 0 deletions
2
migrations/Postgres/1706706252027_create_table_public_features/up.sql
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,2 @@ | ||
CREATE TABLE "public"."features" ("id" uuid NOT NULL DEFAULT gen_random_uuid(), "layer_id" uuid NOT NULL, "properties" jsonb NOT NULL, "geometry" jsonb NOT NULL, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id") , FOREIGN KEY ("layer_id") REFERENCES "public"."layers"("id") ON UPDATE restrict ON DELETE restrict, UNIQUE ("id"));COMMENT ON TABLE "public"."features" IS E'Features GeoJSON'; | ||
CREATE EXTENSION IF NOT EXISTS pgcrypto; |
1 change: 1 addition & 0 deletions
1
migrations/Postgres/1706706423383_alter_table_public_layers_alter_column_incident/down.sql
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 @@ | ||
alter table "public"."layers" rename column "incident_id" to "incident"; |
1 change: 1 addition & 0 deletions
1
migrations/Postgres/1706706423383_alter_table_public_layers_alter_column_incident/up.sql
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 @@ | ||
alter table "public"."layers" rename column "incident" to "incident_id"; |