feature/IO-3182-Phone-Number-Consent - Finish Database changes
This commit is contained in:
@@ -5870,6 +5870,14 @@
|
|||||||
- name: bodyshop
|
- name: bodyshop
|
||||||
using:
|
using:
|
||||||
foreign_key_constraint_on: bodyshopid
|
foreign_key_constraint_on: bodyshopid
|
||||||
|
array_relationships:
|
||||||
|
- name: phone_number_consent_histories
|
||||||
|
using:
|
||||||
|
foreign_key_constraint_on:
|
||||||
|
column: phone_number_consent_id
|
||||||
|
table:
|
||||||
|
name: phone_number_consent_history
|
||||||
|
schema: public
|
||||||
insert_permissions:
|
insert_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
@@ -5925,6 +5933,35 @@
|
|||||||
filter: {}
|
filter: {}
|
||||||
check: null
|
check: null
|
||||||
comment: ""
|
comment: ""
|
||||||
|
- table:
|
||||||
|
name: phone_number_consent_history
|
||||||
|
schema: public
|
||||||
|
object_relationships:
|
||||||
|
- name: phone_number_consent
|
||||||
|
using:
|
||||||
|
foreign_key_constraint_on: phone_number_consent_id
|
||||||
|
select_permissions:
|
||||||
|
- role: user
|
||||||
|
permission:
|
||||||
|
columns:
|
||||||
|
- new_value
|
||||||
|
- old_value
|
||||||
|
- changed_by
|
||||||
|
- reason
|
||||||
|
- changed_at
|
||||||
|
- id
|
||||||
|
- phone_number_consent_id
|
||||||
|
filter:
|
||||||
|
phone_number_consent:
|
||||||
|
bodyshop:
|
||||||
|
associations:
|
||||||
|
_and:
|
||||||
|
- user:
|
||||||
|
authid:
|
||||||
|
_eq: X-Hasura-User-Id
|
||||||
|
- active:
|
||||||
|
_eq: true
|
||||||
|
comment: ""
|
||||||
- table:
|
- table:
|
||||||
name: phonebook
|
name: phonebook
|
||||||
schema: public
|
schema: public
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP TABLE "public"."phone_number_consent_history";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE TABLE "public"."phone_number_consent_history" ("id" uuid NOT NULL DEFAULT gen_random_uuid(), "phone_number_consent_id" uuid NOT NULL, "old_value" boolean NOT NULL, "new_value" boolean NOT NULL, "reason" text NOT NULL, "changed_at" timestamptz NOT NULL DEFAULT now(), "changed_by" text NOT NULL, PRIMARY KEY ("id") , FOREIGN KEY ("phone_number_consent_id") REFERENCES "public"."phone_number_consent"("id") ON UPDATE restrict ON DELETE restrict, UNIQUE ("id"));
|
||||||
|
CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
||||||
Reference in New Issue
Block a user