]> granicus.if.org Git - pdns/commitdiff
Point out that the sql schema is for 4.2/master in the guide.
authorFrank Louwers <frank@louwers.be>
Thu, 18 Apr 2019 14:04:50 +0000 (16:04 +0200)
committerFrank Louwers <frank@louwers.be>
Thu, 18 Apr 2019 14:04:50 +0000 (16:04 +0200)
docs/guides/basic-database.rst

index 0a832e37c739c6364891e2f599cdb0d78bb5b4fd..cffe9dbbbd7457831427ae86a1d4d42e2a76f67c 100644 (file)
@@ -46,10 +46,24 @@ Example: configuring MySQL
 --------------------------
 
 Connect to MySQL as a user with sufficient privileges and issue the
-following commands:
+following commands below if you are running the 4.2 or master version of PowerDNS:
+
+Please find `the 4.1 schema on GitHub <https://github.com/PowerDNS/pdns/blob/rel/auth-4.1.x/modules/gmysqlbackend/schema.mysql.sql>`_.
+
 
 .. literalinclude:: ../../modules/gmysqlbackend/schema.mysql.sql
 
+We recommend you add the following MySQL statements as well. These will add
+foreign key constraints to the tables in order to automate deletion of records, key
+material, and other information upon deletion of a domain from the
+domains table. These will only work on the InnoDB storage engine, but if you
+followed our guide so far, that's exactly the engine we are using.
+
+The following SQL does the job:
+
+.. literalinclude:: ../../modules/gmysqlbackend/enable-foreign-keys.mysql.sql
+
+
 Now we have a database and an empty table. PowerDNS should now be able
 to launch in monitor mode and display no errors: