Change user backend for existing user

I wanted to consolidate user logins having a home server with Samba and Nextcloud running. I created the same users (names) on both services but would now love to change the user backend in Nextcloud from Database to SMB to use the same password in both services. Is this possible?

From what I realized when looking at the table oc_users stores (uid, displayname, password) where uid is the username and oc_users_external stores (backend, uid, displayname) very similar, only password is exchanged by backend. Some other tables like oc_accounts and oc_group_users seem to handle uids from oc_users and oc_users_external identically.

In maintenance mode if I manually add an uid to oc_users_external and then delete this equivalent uid from oc_users will this seamlessly change the backend for this uid? Or do I oversee something?