-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the incompatibility with MySQL's strict mode ( https://sourceforg…
- Loading branch information
Showing
6 changed files
with
70 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Copyright (c) 2012, The Trusted Domain Project. All rights reserved. | ||
|
||
dist_doc_DATA = README.schema schema.mysql | ||
dist_doc_DATA = README.schema schema.mysql README.update-db-schema.mysql update-db-schema.mysql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
To update your database to the current state use this script like this: | ||
|
||
mysql -u <user> -p <passwd> --force < update-db-schema.mysql | ||
|
||
You might receive up to four errors about duplicate keys - this is expected if your database | ||
already has these keys (because you used the MySQL schema in the db sub-direcory instead of | ||
the obsolete schema in the reports sub-dirctory). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
use opendmarc; | ||
SET TIME_ZONE="+00:00"; | ||
ALTER TABLE ipaddr MODIFY COLUMN addr VARCHAR(64) NOT NULL; | ||
DELETE FROM ipaddr WHERE addr = NULL; | ||
ALTER TABLE messages MODIFY COLUMN spf TINYINT NOT NULL; | ||
ALTER TABLE requests ALTER COLUMN locked SET DEFAULT '0'; | ||
ALTER TABLE requests ALTER COLUMN lastsent SET DEFAULT '1970-01-01 00:00:01'; | ||
ALTER TABLE requests ADD UNIQUE KEY domain (domain); | ||
ALTER TABLE requests ADD KEY lastsent (lastsent); | ||
ALTER TABLE messages ADD KEY date (date); | ||
ALTER TABLE signatures ADD KEY message (message); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters