Topic: Suggestion: Improve database integrity
==== Required information ====
- iRedMail version: 0.8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PgSQL
- Linux/BSD distribution name and version: Wheezy (Debian 7)
- Related log if you're reporting an issue:
after some time of using iredmail, I found out, I have some artifacts in database. I know it's because I had wrong utility scripts, but IMO some database integrity checks cannot hurt.
This code creates reference constraint from table alias to domain (nonexisting domain cannot have aliases)
ALTER TABLE alias ADD CONSTRAINT domain_exists FOREIGN KEY (domain) REFERENCES domain (domain) MATCH FULL;
I have the same on table mailbox, but I'm not sure if it's from official release anymore - I guess so?
Thanks for your great work!
Get fast and professional support from iRedMail developers: