Update notification and membership models, add extension installing method

Several updates are made to the notification model, mainly removing the 'entity_id', 'entity_type', and 'language_code' fields from the properties. We've also updated the 'accounts_memberships' table, by preventing its updates except for 'account_role'.
This commit is contained in:
giancarlo
2024-04-29 20:04:11 +07:00
parent 26511b8886
commit e09a10a7f9
4 changed files with 41 additions and 29 deletions

View File

@@ -327,11 +327,8 @@ export type Database = {
channel: Database["public"]["Enums"]["notification_channel"]
created_at: string
dismissed: boolean
entity_id: string | null
entity_type: string | null
expires_at: string | null
id: number
language_code: string
link: string | null
type: Database["public"]["Enums"]["notification_type"]
}
@@ -341,11 +338,8 @@ export type Database = {
channel?: Database["public"]["Enums"]["notification_channel"]
created_at?: string
dismissed?: boolean
entity_id?: string | null
entity_type?: string | null
expires_at?: string | null
id?: never
language_code?: string
link?: string | null
type?: Database["public"]["Enums"]["notification_type"]
}
@@ -355,11 +349,8 @@ export type Database = {
channel?: Database["public"]["Enums"]["notification_channel"]
created_at?: string
dismissed?: boolean
entity_id?: string | null
entity_type?: string | null
expires_at?: string | null
id?: never
language_code?: string
link?: string | null
type?: Database["public"]["Enums"]["notification_type"]
}
@@ -861,6 +852,10 @@ export type Database = {
}
Returns: boolean
}
install_extensions: {
Args: Record<PropertyKey, never>
Returns: undefined
}
is_account_owner: {
Args: {
account_id: string