-- Check if the incorrectly named table exists and rename it
RENAME TABLE users_customuser_accessible_branches TO users_accessible_branches;

-- Or if you need to create it from scratch:
CREATE TABLE IF NOT EXISTS `users_accessible_branches` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `customuser_id` char(32) NOT NULL,
    `branch_id` char(32) NOT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `users_accessible_branches_customuser_id_branch_id_unique` (`customuser_id`, `branch_id`),
    KEY `users_accessible_branches_branch_id_fk` (`branch_id`),
    CONSTRAINT `users_accessible_branches_customuser_id_fk` 
    FOREIGN KEY (`customuser_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
    CONSTRAINT `users_accessible_branches_branch_id_fk` 
    FOREIGN KEY (`branch_id`) REFERENCES `users_branch` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;