Remove account id dependencies from role management

This commit refactor the role management, removing the dependencies on account ids throughout our system. Changes include removing account id related attributes in the roles table schema and functions, modifying seed data and simplifying the role data provider code. This makes role structure more generic and simplifies the role handling process.
This commit is contained in:
giancarlo
2024-04-29 21:14:33 +07:00
parent e09a10a7f9
commit faaa26c4e8
10 changed files with 20 additions and 150 deletions

View File

@@ -512,43 +512,18 @@ export type Database = {
}
roles: {
Row: {
account_id: string | null
hierarchy_level: number
name: string
}
Insert: {
account_id?: string | null
hierarchy_level: number
name: string
}
Update: {
account_id?: string | null
hierarchy_level?: number
name?: string
}
Relationships: [
{
foreignKeyName: "roles_account_id_fkey"
columns: ["account_id"]
isOneToOne: false
referencedRelation: "accounts"
referencedColumns: ["id"]
},
{
foreignKeyName: "roles_account_id_fkey"
columns: ["account_id"]
isOneToOne: false
referencedRelation: "user_account_workspace"
referencedColumns: ["id"]
},
{
foreignKeyName: "roles_account_id_fkey"
columns: ["account_id"]
isOneToOne: false
referencedRelation: "user_accounts"
referencedColumns: ["id"]
},
]
Relationships: []
}
subscription_items: {
Row: {