Quantcast
Channel: iRedMail — iRedMail Support
Viewing all articles
Browse latest Browse all 12094

Suggestion: Improve database integrity

$
0
0

==== 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:
====

Hi Zhang,

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!
Kamil


Viewing all articles
Browse latest Browse all 12094

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>