Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: Grails-Database-Migration 0.2
-
Fix Version/s: Grails-Database-Migration 1.3
-
Labels:None
-
Environment:Oracle
-
Patch Submitted:Yes
Description
I was trying out the db migration plugin on an Oracle DB. I did the following:
1. grails dev dbm-generate-changelog initial_changelog.groovy
2. grails dev dbm-db-doc
which didn't work because the some of the text, especially in the views contained quotes and slashes... so I tried
1. grails dev dbm-generate-changelog changelog.xml
2. grails dev dbm-changelog-to-groovy grails-app/migrations/changelog.xml
3. grails dev dbm-db-doc
This didn't work either. So I forked the plugin and modified ChangelogXml2Groovy.groovy ... I've issued a pull request on my changes for you to look at (see https://github.com/pmcneil/grails-database-migration/commit/0b60ad0bad0f4dd5ff6b138388fcb55a80154089#diff-0 )
I haven't looked any further than that or implemented any tests however this worked for me.
ChangelogXml2Groovy could use literal strings for 'text' vs gstring's "text".
example error:
G:\iWorkspace\gcHrIntegration\grails-app\migrations\changelog.groovy: 56: illegal string body character after dollar sig
{5}n;
solution: either escape a literal dollar sign "\$5" or bracket the value expression "$
" @ line 56, column 35.
createTable(tableName: "AUD$") {
^
1 error