OS X Server - Open Directory not starting after upgrade

After upgrading my OS X Server to version 10.10.3 I noticed that the Open Directory was not running, and refused to when trying to start it again.
After some searching in the log files and on the web I came to the conclusion that it was corrupt, which is not something you want.

After a bit of looking I found a solution that worked for me and got the Open Directory service up and running again.

The commands below solved my issue and repaired the corrupt table in the database so that the service could start again:

sudo launchctl unload /System/Library/LaunchDaemons/org.openldap.slapd.plist
sudo diskutil repairPermissions /
sudo db_recover -cv -h /var/db/openldap/openldap-data/
sudo /usr/libexec/slapd -Tt
sudo db_recover -cv -h /var/db/openldap/authdata/
sudo /usr/libexec/slapd -Tt
sudo launchctl load /System/Library/LaunchDaemons/org.openldap.slapd.plist

Credits to the following thread on Apple Discussion board that pointed out the commands.