diff --git a/db/README.md b/db/README.md deleted file mode 100644 index 531b11f..0000000 --- a/db/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# [memo-demo.hasura.app](https://memo-demo.hasura.app) - -https://cloud.hasura.io → "Git Deployment" diff --git a/db/config.yaml b/db/config.yaml deleted file mode 100644 index 1ee3d0d..0000000 --- a/db/config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -version: 3 -endpoint: https://memo-demo.hasura.app -metadata_directory: metadata -actions: - kind: synchronous - handler_webhook_baseurl: http://localhost:3000 diff --git a/db/metadata/actions.graphql b/db/metadata/actions.graphql deleted file mode 100644 index e69de29..0000000 diff --git a/db/metadata/actions.yaml b/db/metadata/actions.yaml deleted file mode 100644 index 1edb4c2..0000000 --- a/db/metadata/actions.yaml +++ /dev/null @@ -1,6 +0,0 @@ -actions: [] -custom_types: - enums: [] - input_objects: [] - objects: [] - scalars: [] diff --git a/db/metadata/allow_list.yaml b/db/metadata/allow_list.yaml deleted file mode 100644 index 4ef597f..0000000 --- a/db/metadata/allow_list.yaml +++ /dev/null @@ -1 +0,0 @@ -- collection: allowed-queries diff --git a/db/metadata/cron_triggers.yaml b/db/metadata/cron_triggers.yaml deleted file mode 100644 index eccf0e7..0000000 --- a/db/metadata/cron_triggers.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- name: daily_reset - webhook: https://memo-demo.hasura.app/api/rest/delete_pages - schedule: 0 0 * * * - include_in_metadata: true - payload: {} - headers: - - value: "***" - name: x-hasura-admin-secret diff --git a/db/metadata/databases/databases.yaml b/db/metadata/databases/databases.yaml deleted file mode 100644 index 60a7152..0000000 --- a/db/metadata/databases/databases.yaml +++ /dev/null @@ -1,35 +0,0 @@ -- name: default - kind: postgres - tables: - - table: - schema: public - name: pages - insert_permissions: - - role: anonymous - permission: - check: {} - columns: - - id - - content - backend_only: false - select_permissions: - - role: anonymous - permission: - columns: - - id - - content - filter: {} - update_permissions: - - role: anonymous - permission: - columns: - - id - - content - filter: {} - check: {} - configuration: - connection_info: - use_prepared_statements: false - database_url: - from_env: HEROKU_DATABASE_URL - isolation_level: read-committed diff --git a/db/metadata/query_collections.yaml b/db/metadata/query_collections.yaml deleted file mode 100644 index a055b07..0000000 --- a/db/metadata/query_collections.yaml +++ /dev/null @@ -1,9 +0,0 @@ -- name: allowed-queries - definition: - queries: - - name: get page - query: "query getPage($id: Int!) {\n page: pages_by_pk(id: $id) {\n id\n content\n }\n}" - - name: put page - query: "mutation putPage($id: Int, $content: jsonb!) {\n page: insert_pages_one(object: {id: $id, content: $content}, on_conflict: {constraint: pages_pkey, update_columns: content}) {\n id\n content\n }\n}" - - name: delete all - query: "mutation deleteAll($scheduled_time: String = \"\", $payload: jsonb = {}, $name: String = \"\", $id: String = \"\") {\n delete_pages(where: {id: {_is_null: false}, _or: {content: {_neq: {scheduled_time: $scheduled_time, payload: $payload, name: $name, id: $id}}}}) {\n affected_rows\n }\n}" diff --git a/db/metadata/remote_schemas.yaml b/db/metadata/remote_schemas.yaml deleted file mode 100644 index fe51488..0000000 --- a/db/metadata/remote_schemas.yaml +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/db/metadata/rest_endpoints.yaml b/db/metadata/rest_endpoints.yaml deleted file mode 100644 index cbc479b..0000000 --- a/db/metadata/rest_endpoints.yaml +++ /dev/null @@ -1,28 +0,0 @@ -- definition: - query: - collection_name: allowed-queries - query_name: delete all - url: delete_pages - methods: - - POST - - DELETE - name: delete all - comment: null -- definition: - query: - collection_name: allowed-queries - query_name: get page - url: page/:id - methods: - - GET - name: get page - comment: null -- definition: - query: - collection_name: allowed-queries - query_name: put page - url: page/:id - methods: - - PUT - name: put page - comment: null diff --git a/db/metadata/version.yaml b/db/metadata/version.yaml deleted file mode 100644 index 0a70aff..0000000 --- a/db/metadata/version.yaml +++ /dev/null @@ -1 +0,0 @@ -version: 3 diff --git a/db/migrations/default/1646649644573_init/up.sql b/db/migrations/default/1646649644573_init/up.sql deleted file mode 100644 index d27e6ad..0000000 --- a/db/migrations/default/1646649644573_init/up.sql +++ /dev/null @@ -1,16 +0,0 @@ -SET check_function_bodies = false; -CREATE TABLE public.pages ( - id integer NOT NULL, - content jsonb NOT NULL -); -CREATE SEQUENCE public.pages_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; -ALTER SEQUENCE public.pages_id_seq OWNED BY public.pages.id; -ALTER TABLE ONLY public.pages ALTER COLUMN id SET DEFAULT nextval('public.pages_id_seq'::regclass); -ALTER TABLE ONLY public.pages - ADD CONSTRAINT pages_pkey PRIMARY KEY (id);