Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tighten MySQL settings #31

Open
mbohal opened this issue Sep 30, 2018 · 0 comments
Open

Tighten MySQL settings #31

mbohal opened this issue Sep 30, 2018 · 0 comments
Labels
dbjr-approved enhancement New feature or request

Comments

@mbohal
Copy link
Contributor

mbohal commented Sep 30, 2018

Presently there is no check of the db settings. This has to do with issues like:

  • db charset
  • db collation
  • strict_mode (and all the related settings)

There are collated columns all over the db and when running migration on a db that is not collated foreign keys sometimes can not be made. This particular case was fixed by this diff:

mb@mb-laptop ~/Projects/epartool/epartool (master ±1) ~> git diff
diff --git a/data/phinx-migrations/20180221091158_dbjr1358.php b/data/phinx-migrations/20180221091158_dbjr1358.php
index 3fb54e63..7352ddfa 100644
--- a/data/phinx-migrations/20180221091158_dbjr1358.php
+++ b/data/phinx-migrations/20180221091158_dbjr1358.php
@@ -10,7 +10,7 @@ class Dbjr1358 extends AbstractMigration
 CREATE TABLE `voting_button_set` (
   `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
   `consultation_id` int(10) unsigned NOT NULL,
-  `button_type` varchar(191) NOT NULL,
+  `button_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
   `points` int NOT NULL,
   `enabled` tinyint(1) NOT NULL,
   `label` text NULL
mb@mb-laptop ~/Projects/epartool/epartool (master ±1) ~>
@mbohal mbohal added the enhancement New feature or request label Sep 30, 2018
@davidurban davidurban changed the title Thighten MySQL settings Tighten MySQL settings Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dbjr-approved enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants