notes, please see [Migration](migration.md). This schema contains all elements
needed for master, slave and superslave operation.
-When using the InnoDB storage engine, we suggest adding the following lines to
-the 'create table records' command above:
-
-```
-CONSTRAINT `records_ibfk_1` FOREIGN KEY (`domain_id`) REFERENCES `domains`
-(`id`) ON DELETE CASCADE
-```
-
-Or, if you have already created the tables, execute:
-
+When using the InnoDB storage engine, we suggest adding foreign key contraints
+to the tables in order to automate deletion of records, key material, and other
+information upon deletion of a domain from the domains table. The following SQL
+does the job:
```
-ALTER TABLE `records` ADD CONSTRAINT `records_ibfk_1` FOREIGN KEY (`domain_id`)
-REFERENCES `domains` (`id`) ON DELETE CASCADE;
+!!include=../modules/gmysqlbackend/enable-foreign-keys.mysql.sql
```
-This automates deletion of records on deletion of a domain from the domains table.
-
# Using MySQL replication
To support `NATIVE` domains, the `binlog_format` for the MySQL replication **must**
be set to `MIXED` or `ROW` to prevent differences in data between replicated