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

Not working with mysql 5.7 #47

Closed
p-hash opened this issue Nov 26, 2016 · 3 comments
Closed

Not working with mysql 5.7 #47

p-hash opened this issue Nov 26, 2016 · 3 comments

Comments

@p-hash
Copy link

p-hash commented Nov 26, 2016

Error I get while trying to install this module:

All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead

And my dirty patch fixing this:

$ diff sql/install.php sql/install.php__ 
50c50
<   UNIQUE KEY (`id_smart_blog_category`,`id_lang`)
---
>   PRIMARY KEY (`id_smart_blog_category`,`id_lang`)
56c56
<   UNIQUE KEY (`id_smart_blog_category`,`id_shop`),
---
>   PRIMARY KEY (`id_smart_blog_category`,`id_shop`),
77c77
<   UNIQUE KEY (`id_smart_blog_comment`, `id_shop`),
---
>   PRIMARY KEY (`id_smart_blog_comment`, `id_shop`),
121c121
<   UNIQUE KEY (`id_smart_blog_post`,`id_lang`)
---
>   PRIMARY KEY (`id_smart_blog_post`,`id_lang`)
127c127
<     UNIQUE KEY (`id_smart_blog_post`, `id_shop`),
---
>     PRIMARY KEY (`id_smart_blog_post`, `id_shop`),
136c136
<     UNIQUE KEY (`id_smart_blog_post_meta`, `id_smart_blog_post`),
---
>     PRIMARY KEY (`id_smart_blog_post_meta`, `id_smart_blog_post`),
143c143
<     UNIQUE KEY (`id_smart_blog_category`, `id_smart_blog_post`),
---
>     PRIMARY KEY (`id_smart_blog_category`, `id_smart_blog_post`),
185c185
<        UNIQUE KEY (`id_smart_blog_gallary_images`,`id_smart_blog_post`)
---
>        PRIMARY KEY (`id_smart_blog_gallary_images`,`id_smart_blog_post`)
192c192
<         UNIQUE KEY (`id_smart_blog_gallary_images`,`id_lang`)
---
>         PRIMARY KEY (`id_smart_blog_gallary_images`,`id_lang`)
200c200
<     UNIQUE KEY (`id_smart_blog_post_meta`, `id_smart_blog_post`),
---
>     PRIMARY KEY (`id_smart_blog_post_meta`, `id_smart_blog_post`),
202c202
< ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8';
---
> ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8';
\ No newline at end of file
@webmatter
Copy link

webmatter commented Feb 18, 2017

Hi, I am having the same issue. Can you explain your fix? Just replacing PRIMARY KEY with UNIQUE KEY?

P.S.: Got it working. Thanks!

@p-hash
Copy link
Author

p-hash commented Feb 18, 2017

Yep, just that. diff is attached.

@smartdatasoft
Copy link
Owner

smartdatasoft commented Jan 11, 2018

This issue was fixed. can you check our new version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants