-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
Mysql errror : alter event table not working #165
Comments
@Praitheesh good catch! Thank you, I'll fix the script :) |
@Praitheesh I've pushed a fix, could you try it? |
Still it is throwing below error.
More Logs here : alfio.log.tar.gz |
I think above error because of previous flyway migration filer. I got it work by deleting entry from schema_version table.
@syjer is any way to reset programmability via flyway ? |
@Praitheesh I don't know, and I'm not sure it's useful for our case to call programmatically the repair functionality of flyway: if a migration fail we could have the database in an inconsistent state (this is the case for mysql which don't have transactional DDL), so we need to fix it manually anyway. |
@syjer agree with you. |
alfio.log.tar.gz
I tried to run the application with latest changes.
Mysql Version : 5.7.14
Got the error when try to alter event table saying
Invalid default value for 'end_ts'.
It might be related to #102. Attached log for the reference.`SQL State : 42000
Error Code : 1067
Message : Invalid default value for 'end_ts'
Location : alfio/db/MYSQL/V15_1.8.8__ADD_FIRST_LAST_NAME.sql (/home/praitheesh/github/alf.io/build/resources/main/alfio/db/MYSQL/V15_1.8.8__ADD_FIRST_LAST_NAME.sql)
Line : 19
Statement : alter table event add column version varchar(50)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'migrator' defined in alfio.config.DataSourceConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.flywaydb.core.Flyway]: Factory method 'migrator' threw exception; nested exception is org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException:
Tried to alter the table manually. Got below message.
mysql> alter table event add column version varchar(50); ERROR 1067 (42000): Invalid default value for 'end_ts'
The text was updated successfully, but these errors were encountered: