Comments (7)
I'm nit sure of what you want to do with TIMESTAMP NULL
, AFAIK, if you don't specify NOT NULL
on a column, its value can be NULL
, so I think the fix won't change anything. What is the problem you had when you imported the schema?
from glewlwyd.
Thanks, @babelouest . When I imported the schema without the fix, the following errors occurred.
DB: MySQL.
...
ERROR 1067 (42000): Invalid default value for 'grp_reset_at'
ERROR 1146 (42S02): Table 'es-users.g_reset_password' doesn't exist
ERROR 1067 (42000): Invalid default value for 'grt_last_seen'
ERROR 1146 (42S02): Table 'es-users.g_refresh_token' doesn't exist
ERROR 1215 (HY000): Cannot add foreign key constraint
ERROR 1067 (42000): Invalid default value for 'gss_last_seen'
ERROR 1146 (42S02): Table 'es-users.g_session' doesn't exist
ERROR 1215 (HY000): Cannot add foreign key constraint
...
The following tables were not created
g_refresh_token_scope
g_client_scope
g_access_token
g_refresh_token
g_session
g_reset_password
Then I executed each SQL statement separately to find out the issue. The error was due to default value of the TIMESTAMP field.
Further, I made explicit TIMESTAMP NULL
Reference:
https://dev.mysql.com/doc/refman/5.7/en/timestamp-initialization.html
TIMESTAMP Initialization and the NULL Attribute
By default, TIMESTAMP columns are NOT NULL, cannot contain NULL values, and assigning NULL assigns the current timestamp. To permit a TIMESTAMP column to contain NULL, explicitly declare it with the NULL attribute.
By setting TIMESTAMP NULL, I was able to import schema successfully.
from glewlwyd.
yup, I see it, we probably have different configuration on our mariadb servers, but if you want to set the default value to NULL on timestamps, I suggest you use the more explicit DEFAULT NULL
instead of NULL
only. Can you update your pull request with that?
from glewlwyd.
Sure, I have updated the file. Could you please check?
Best Regards
Maruthi
from glewlwyd.
@babelouest , I tested with TIMESTAMP DEFAULT NULL, and it did not fix the problem. Importing the schema failed again with DEFAULT NULL.
So, I had to revert it to TIMESTAMP NULL.
You may please check the same in your MySQL servers.
from glewlwyd.
I may have a different configuration on my server because this problem never occurred, and I use this script a lot to test the application in a clean environment. But this syntax seems correct and fix your problem so I'm totally OK.
from glewlwyd.
Thanks @babelouest , I will close the issue.
from glewlwyd.
Related Issues (20)
- [Issue]Segfault right after OpenID succesful authentication with response_type=code when passing nonce parameter, but invalid request without nonce (nonce+required) HOT 15
- [Issue] OIDC plugin prevents changing the session cookie name HOT 1
- [Issue] openID Connect plugin cannot load 'JWKS to use' HOT 3
- [Feature request] Additional CORS related header configuration HOT 11
- [Feature request] Deploy webapp to an alternative web server HOT 5
- ld: error: duplicate symbol: global_handler_close_cond HOT 2
- Support for SameSite Cookies HOT 8
- [Feature request] Database schema support HOT 2
- Wordpress + glewlwyd HOT 1
- Can we use glewlwyd as bridging for other SSO services? HOT 1
- glewlwyd attempts to log in as root to mysql server despite different data provided HOT 5
- [Feature request] Ability to serve Single Page Applications from static server HOT 3
- [Issue] Possible config check bug HOT 1
- [Issue] Memory leaks HOT 2
- [Security request] Registration plugin: Update password without entering old password is insecure HOT 2
- [Issue] Register plugin: Add/save configuration errors HOT 1
- [Issue] Segfault on oidc login flow after user registration
- Cannot install on Ubuntu 22.04 HOT 2
- Docker Image for arm64 HOT 2
- [Windows] Enabling SSL feature - Cont'd HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glewlwyd.