-
Notifications
You must be signed in to change notification settings - Fork 301
Database Configuration
Maximilian Tagher edited this page Aug 16, 2015
·
7 revisions
Database configuration may change the semantics of your database in important ways; this page lists options likely to affect Persistent users.
By default, MySQL will truncate too-long values, which can corrupt data (by e.g. truncating a binary file) or cause unexpected behavior. If you'd like to have MySQL raise an error instead, enable strict mode. You can enable this by editing your my.cnf file:
sql_mode="STRICT_ALL_TABLES"
or by setting the SQL mode from the MySQL console:
SET GLOBAL sql_mode = 'STRICT_ALL_TABLES';
Foreign key checks are not enabled by default in SQLite. This wiki page explains how to enable foreign key checks when using Persistent/Yesod.