-
-
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.
- Loading branch information
Showing
53 changed files
with
3,795 additions
and
2,113 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 @@ | ||
github: f-eld-ch |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
54 changes: 54 additions & 0 deletions
54
hasura/metadata/databases/Postgres/tables/public_features.yaml
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,54 @@ | ||
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 | ||
comment: "" | ||
select_permissions: | ||
- role: editor | ||
permission: | ||
columns: | ||
- geometry | ||
- properties | ||
- created_at | ||
- deleted_at | ||
- updated_at | ||
- id | ||
- layer_id | ||
filter: {} | ||
comment: "" | ||
- role: viewer | ||
permission: | ||
columns: | ||
- geometry | ||
- properties | ||
- created_at | ||
- deleted_at | ||
- updated_at | ||
- id | ||
- layer_id | ||
filter: {} | ||
comment: "" | ||
update_permissions: | ||
- role: editor | ||
permission: | ||
columns: | ||
- deleted_at | ||
- geometry | ||
- properties | ||
- updated_at | ||
filter: {} | ||
check: null | ||
comment: "" |
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
58 changes: 58 additions & 0 deletions
58
hasura/metadata/databases/Postgres/tables/public_layers.yaml
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,58 @@ | ||
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: | ||
- created_at | ||
- id | ||
- incident_id | ||
- name | ||
comment: "" | ||
select_permissions: | ||
- role: editor | ||
permission: | ||
columns: | ||
- name | ||
- created_at | ||
- deleted_at | ||
- updated_at | ||
- id | ||
- incident_id | ||
filter: {} | ||
comment: "" | ||
- role: viewer | ||
permission: | ||
columns: | ||
- name | ||
- created_at | ||
- deleted_at | ||
- updated_at | ||
- id | ||
- incident_id | ||
filter: {} | ||
comment: "" | ||
update_permissions: | ||
- role: editor | ||
permission: | ||
columns: | ||
- deleted_at | ||
- name | ||
- updated_at | ||
filter: {} | ||
check: null | ||
comment: "" |
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 |
---|---|---|
|
@@ -61,5 +61,4 @@ select_permissions: | |
delete_permissions: | ||
- role: editor | ||
permission: | ||
backend_only: false | ||
filter: {} |
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 @@ | ||
{} |
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
hasura/migrations/Postgres/1707469071936_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
hasura/migrations/Postgres/1707469071936_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_id" uuid NOT NULL, "name" text NOT NULL, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz, "deleted_at" timestamptz, PRIMARY KEY ("id") , FOREIGN KEY ("incident_id") REFERENCES "public"."incidents"("id") ON UPDATE restrict ON DELETE cascade, UNIQUE ("id"));COMMENT ON TABLE "public"."layers" IS E'Layers for Maps'; | ||
CREATE EXTENSION IF NOT EXISTS pgcrypto; |
1 change: 1 addition & 0 deletions
1
...ons/Postgres/1707469130324_alter_table_public_layers_add_unique_incident_id_name/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" drop constraint "layers_incident_id_name_key"; |
1 change: 1 addition & 0 deletions
1
...tions/Postgres/1707469130324_alter_table_public_layers_add_unique_incident_id_name/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" add constraint "layers_incident_id_name_key" unique ("incident_id", "name"); |
1 change: 1 addition & 0 deletions
1
hasura/migrations/Postgres/1707469301937_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
hasura/migrations/Postgres/1707469301937_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(), "geometry" jsonb NOT NULL, "properties" jsonb NOT NULL, "layer_id" uuid 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 no action, UNIQUE ("id"));COMMENT ON TABLE "public"."features" IS E'Features for Layers'; | ||
CREATE EXTENSION IF NOT EXISTS pgcrypto; |
4 changes: 4 additions & 0 deletions
4
.../migrations/Postgres/1707469588967_set_update_at_trigger_for_layers_and_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,4 @@ | ||
-- Could not auto-generate a down migration. | ||
-- Please write an appropriate down migration for the SQL below: | ||
-- CREATE TRIGGER set_public_layers_updated_at BEFORE UPDATE ON public.layers FOR EACH ROW EXECUTE FUNCTION public.set_current_timestamp_updated_at(); | ||
-- CREATE TRIGGER set_public_features_updated_at BEFORE UPDATE ON public.features FOR EACH ROW EXECUTE FUNCTION public.set_current_timestamp_updated_at(); |
2 changes: 2 additions & 0 deletions
2
...ra/migrations/Postgres/1707469588967_set_update_at_trigger_for_layers_and_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 TRIGGER set_public_layers_updated_at BEFORE UPDATE ON public.layers FOR EACH ROW EXECUTE FUNCTION public.set_current_timestamp_updated_at(); | ||
CREATE TRIGGER set_public_features_updated_at BEFORE UPDATE ON public.features FOR EACH ROW EXECUTE FUNCTION public.set_current_timestamp_updated_at(); |
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.