-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
migration bug fixed V0_7_7__update.sql #1394
Conversation
why do you think there is a problem? what specific problem does the commit fix? |
I have the same error as you, on a vanilla new installation. I aligned on your branch to get your patch but I still have an error.
Error: ERROR] Migration of schema Detail logsMy source
Command log
|
[ERROR] Migration of schema to solve this problem, modify the docker-compose.yml as follows ( image: mariadb:10.4.30) version: "3.0" volumes: services: db: app:
|
I'm not sure to understand you. I'm not using Docker. I'm on a plain Debian machine on which one I only have Mariadb-10.5 or 10.11. Look like I'm suck until this bug get properly fixed. |
Fixes bug in version 3.6.0 when we want to run the application with docker file |
Newer version of mariadb are much more strict about changing data-typs or character-sets if the data is uses in a foreign key. That's why V0_7_7_update.sql and V0.8.6_update.sql are throwing errors on newer maraidb version (I assume since 10.5). @mahmudarslan: Would you please also change V0_8_6_update.sql. Drop the foreign keys which throw errors and restore them at the end of the script. Than this pk should also work vor mariadb v10.5 and newer Know problem with this recommended solution: |
Sorry for the maybe stupid question but I am completely new to the Linux and GitHub world. |
@Jenf01 Your approach is good, and trying to fix is appreciated. Sadly, the fix you proposed will break servers in production and cannot be merged. As said by @fnkbsi something should be done on checksums. Maybe repair or baseline flyway commands are possible but I'm not sure they are part of the Flyway OSS version. If a modification is planned in migration files, then maybe it is a perfect time to change the baseline and drop the need for extra rights like I tried in #1140 |
Hello, just to let you know that the build also fails right now with |
what is the state of this PR after merging #1439 ? |
i am closing this issue due to inactivity. feel free to reopen if it is still relevant. |
release version : steve-3.6.0
docker-compose up
2024-02-23 17:31:30 [INFO] BUILD FAILURE
2024-02-23 17:31:30 [INFO] ------------------------------------------------------------------------
2024-02-23 17:31:30 [INFO] Total time: 56.074 s
2024-02-23 17:31:30 [INFO] Finished at: 2024-02-23T14:31:30Z
2024-02-23 17:31:30 [INFO] ------------------------------------------------------------------------
2024-02-23 17:31:30 [WARNING]
2024-02-23 17:31:30 [WARNING] Plugin validation issues were detected in 2 plugin(s)
2024-02-23 17:31:30 [WARNING]
2024-02-23 17:31:30 [WARNING] * pl.project13.maven:git-commit-id-plugin:4.9.10
2024-02-23 17:31:30 [WARNING] * org.flywaydb:flyway-maven-plugin:7.15.0
2024-02-23 17:31:30 [WARNING]
2024-02-23 17:31:30 [WARNING] For more or less details, use 'maven.plugin.validation' property with one of the values (case insensitive): [BRIEF, DEFAULT, VERBOSE]
2024-02-23 17:31:30 [WARNING]
2024-02-23 17:31:30 [ERROR] Failed to execute goal org.flywaydb:flyway-maven-plugin:7.15.0:migrate (default) on project steve: org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: Migration V0_7_7__update.sql failed
2024-02-23 17:31:30 [ERROR] -----------------------------------
2024-02-23 17:31:30 [ERROR] SQL State : HY000
2024-02-23 17:31:30 [ERROR] Error Code : 1833
2024-02-23 17:31:30 [ERROR] Message : Cannot change column 'chargeBoxId': used in a foreign key constraint 'stevedb/FK_chargeBoxId_c' of table 'stevedb/connector'
2024-02-23 17:31:30 [ERROR] Location : /code/src/main/resources/db/migration/V0_7_7__update.sql (/code/src/main/resources/db/migration/V0_7_7__update.sql)
2024-02-23 17:31:30 [ERROR] Line : 1
2024-02-23 17:31:30 [ERROR] Statement : ALTER TABLE
chargebox
2024-02-23 17:31:30 [ERROR] CHANGE COLUMN
chargeBoxId
chargeBoxId
VARCHAR(255) NOT NULL COMMENT '' ,2024-02-23 17:31:30 [ERROR] CHANGE COLUMN
endpoint_address
endpoint_address
VARCHAR(255) NULL DEFAULT NULL COMMENT '' ,2024-02-23 17:31:30 [ERROR] CHANGE COLUMN
ocppProtocol
ocppProtocol
VARCHAR(255) NULL DEFAULT NULL COMMENT '' ,2024-02-23 17:31:30 [ERROR] CHANGE COLUMN
chargePointVendor
chargePointVendor
VARCHAR(255) NULL DEFAULT NULL COMMENT '' ,2024-02-23 17:31:30 [ERROR] CHANGE COLUMN
chargePointModel
chargePointModel
VARCHAR(255) NULL DEFAULT NULL COMMENT '' ,2024-02-23 17:31:30 [ERROR] CHANGE COLUMN
chargePointSerialNumber
chargePointSerialNumber
VARCHAR(255) NULL DEFAULT NULL COMMENT '' ,2024-02-23 17:31:30 [ERROR] CHANGE COLUMN
chargeBoxSerialNumber
chargeBoxSerialNumber
VARCHAR(255) NULL DEFAULT NULL COMMENT '' ,2024-02-23 17:31:30 [ERROR] CHANGE COLUMN
fwVersion
fwVersion
VARCHAR(255) NULL DEFAULT NULL COMMENT '' ,2024-02-23 17:31:30 [ERROR] CHANGE COLUMN
fwUpdateStatus
fwUpdateStatus
VARCHAR(255) NULL DEFAULT NULL COMMENT '' ,2024-02-23 17:31:30 [ERROR] CHANGE COLUMN
iccid
iccid
VARCHAR(255) NULL DEFAULT NULL COMMENT '' ,2024-02-23 17:31:30 [ERROR] CHANGE COLUMN
imsi
imsi
VARCHAR(255) NULL DEFAULT NULL COMMENT '' ,2024-02-23 17:31:30 [ERROR] CHANGE COLUMN
meterType
meterType
VARCHAR(255) NULL DEFAULT NULL COMMENT '' ,2024-02-23 17:31:30 [ERROR] CHANGE COLUMN
meterSerialNumber
meterSerialNumber
VARCHAR(255) NULL DEFAULT NULL COMMENT '' ,2024-02-23 17:31:30 [ERROR] CHANGE COLUMN
diagnosticsStatus
diagnosticsStatus
VARCHAR(255) NULL DEFAULT NULL COMMENT ''2024-02-23 17:31:30 [ERROR]
2024-02-23 17:31:30 [ERROR] -> [Help 1]
2024-02-23 17:31:30 [ERROR]
2024-02-23 17:31:30 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
2024-02-23 17:31:30 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
2024-02-23 17:31:30 [ERROR]
2024-02-23 17:31:30 [ERROR] For more information about the errors and possible solutions, please read the following articles:
2024-02-23 17:31:30 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException