Added sender to messages sent IO-590
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."messages" DROP COLUMN "user";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."messages" ADD COLUMN "user" uuid NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: alter table "public"."messages" rename column "userid" to "user";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: alter table "public"."messages" rename column "user" to "userid";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."messages" ALTER COLUMN "userid" TYPE uuid;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."messages" ALTER COLUMN "userid" TYPE text;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: alter table "public"."messages" drop constraint "messages_userid_fkey";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,10 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: |-
|
||||
alter table "public"."messages"
|
||||
add constraint "messages_userid_fkey"
|
||||
foreign key ("userid")
|
||||
references "public"."users"
|
||||
("email") on update set null on delete set null;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,36 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: messages
|
||||
schema: public
|
||||
type: drop_insert_permission
|
||||
- args:
|
||||
permission:
|
||||
check:
|
||||
conversation:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
columns:
|
||||
- id
|
||||
- created_at
|
||||
- updated_at
|
||||
- msid
|
||||
- conversationid
|
||||
- text
|
||||
- image
|
||||
- image_path
|
||||
- isoutbound
|
||||
- status
|
||||
- read
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: messages
|
||||
schema: public
|
||||
type: create_insert_permission
|
||||
@@ -0,0 +1,37 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: messages
|
||||
schema: public
|
||||
type: drop_insert_permission
|
||||
- args:
|
||||
permission:
|
||||
check:
|
||||
conversation:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
columns:
|
||||
- conversationid
|
||||
- created_at
|
||||
- id
|
||||
- image
|
||||
- image_path
|
||||
- isoutbound
|
||||
- msid
|
||||
- read
|
||||
- status
|
||||
- text
|
||||
- updated_at
|
||||
- userid
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: messages
|
||||
schema: public
|
||||
type: create_insert_permission
|
||||
@@ -0,0 +1,37 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: messages
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: true
|
||||
columns:
|
||||
- image
|
||||
- isoutbound
|
||||
- read
|
||||
- image_path
|
||||
- msid
|
||||
- status
|
||||
- text
|
||||
- created_at
|
||||
- updated_at
|
||||
- conversationid
|
||||
- id
|
||||
computed_fields: []
|
||||
filter:
|
||||
conversation:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
role: user
|
||||
table:
|
||||
name: messages
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,38 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: messages
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: true
|
||||
columns:
|
||||
- conversationid
|
||||
- created_at
|
||||
- id
|
||||
- image
|
||||
- image_path
|
||||
- isoutbound
|
||||
- msid
|
||||
- read
|
||||
- status
|
||||
- text
|
||||
- updated_at
|
||||
- userid
|
||||
computed_fields: []
|
||||
filter:
|
||||
conversation:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
role: user
|
||||
table:
|
||||
name: messages
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -3014,32 +3014,34 @@ tables:
|
||||
- active:
|
||||
_eq: true
|
||||
columns:
|
||||
- id
|
||||
- created_at
|
||||
- updated_at
|
||||
- msid
|
||||
- conversationid
|
||||
- text
|
||||
- created_at
|
||||
- id
|
||||
- image
|
||||
- image_path
|
||||
- isoutbound
|
||||
- status
|
||||
- msid
|
||||
- read
|
||||
- status
|
||||
- text
|
||||
- updated_at
|
||||
- userid
|
||||
select_permissions:
|
||||
- role: user
|
||||
permission:
|
||||
columns:
|
||||
- conversationid
|
||||
- created_at
|
||||
- id
|
||||
- image
|
||||
- isoutbound
|
||||
- read
|
||||
- image_path
|
||||
- isoutbound
|
||||
- msid
|
||||
- read
|
||||
- status
|
||||
- text
|
||||
- created_at
|
||||
- updated_at
|
||||
- conversationid
|
||||
- id
|
||||
- userid
|
||||
filter:
|
||||
conversation:
|
||||
bodyshop:
|
||||
|
||||
Reference in New Issue
Block a user