AppFlowy-Cloud/.sqlx/query-c843fb8517b1e364016b85a9e94927673bf8311bfbf723b610d59ecfef3fafce.json
Zack 377d7ad8f7
opti: Select all collab members (#215)
* feat: use af member stream for populating policies

* fix: add missing sqlx files

* chore: removed unused function
2023-12-16 13:02:37 +08:00

15 lines
721 B
JSON

{
"db_name": "PostgreSQL",
"query": "\n DELETE FROM public.af_workspace_member\n WHERE\n workspace_id = $1\n AND uid = (\n SELECT uid FROM public.af_user WHERE email = $2\n )\n -- Ensure the user to be deleted is not the original owner.\n -- 1. TODO(nathan): User must transfer ownership to another user first.\n -- 2. User must have at least one workspace\n AND uid <> (\n SELECT owner_uid FROM public.af_workspace WHERE workspace_id = $1\n );\n ",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Uuid",
"Text"
]
},
"nullable": []
},
"hash": "c843fb8517b1e364016b85a9e94927673bf8311bfbf723b610d59ecfef3fafce"
}