Skip to content

Instantly share code, notes, and snippets.

@vishwasbabu
Last active August 29, 2015 14:19
Show Gist options
  • Save vishwasbabu/c5a2bbefb6db82d9bbc2 to your computer and use it in GitHub Desktop.
Save vishwasbabu/c5a2bbefb6db82d9bbc2 to your computer and use it in GitHub Desktop.
Fix Multiple entires for a tenant in tenants table
use mifosplatform-tenants;
/**Check if multiple entries exist for a tenant**/
select * from tenants where identifier = "ssi";
/***If this returns more than one entry, delete the duplicate entries (id is the id of the duplicate row you want to delete)**/
delete from tenants where identifier="ssi" and id="237";
/**Check again if multiple entries exist for a tenant (the query should return a single result)**/
select * from tenants where identifier = "ssi";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment