apache / apache/grails-core

MD5SUM the same for all Grails Changes

Open
#14,440 3 comments 0 reactions 0 assignees View on GitHub
relates-to: grails-hibernate5-dbmigration
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

### Task List

- [ x ] Steps to reproduce provided
- [ x ] Stacktrace (if present) provided
- [ x ] Full description of the issue provided (see below)
- [ x ] Link to the code that is causing this

### Steps to Reproduce

1. Run a migration script with multiple grails changes
2. Look at the DB change log:
```SELECT * FROM tdstm.DATABASECHANGELOG where DESCRIPTION='Grails Change' order by ORDEREXECUTED desc```
3. Note the MD5SUM values are all the same

### Expected Behaviour

All the MD5SUM values should be different even for grails changes and should be based off the content of the change script.

### Actual Behaviour
All the MD5SUM values are the same for grails changes.

### Environment Information

- **Operating System**: MAC
- **Grails Version:** 2.5.5, 3.3.10, 4.0.1
- **Plugin Version:** any including the latest
- **Database:** MYSQL
- **JDK Version:** 1.8

The line of code responsible for this is:
https://github.com/grails-plugins/grails-database-migration/blob/master/src/main/groovy/org/grails/plugins/databasemigration/liquibase/GroovyChange.groovy#L179

Contributor guide

Open the contributing guide

Research direction

Start by reading src/main/groovy/org/grails/plugins/databasemigration/liquibase/GroovyChange.groovy around line 179, then reproduce the migration with multiple Grails changes and inspect the DATABASECHANGELOG query. Done means separate Grails changes produce distinct MD5SUM values based on their change-script content.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.