Changelog changelog.groovy not found
Asked Answered
C

1

6

I've created new Grails project in IntellijIDEA 11.1.3 and try to run it.

When I open http://localhost:8080/application/dbdoc (accessing default action of controller grails.plugin.databasemigration.DbdocController), I keep getting message:

Changelog changelog.groovy not found

Although, file changelog.groovy exists in file system of my project in folder ./grails-app/migrations. I've generated it, using command:

grails dbm-create-changelog changelog.groovy 

And now it has the following content:

databaseChangeLog = {
    changeSet(author: "Edward (generated)", id: "changelog") {
        // TODO add changes and preconditions here
    }
}

What I need to do to make it work?

Contralto answered 19/8, 2012 at 23:9 Comment(0)
M
6

I am running IntelliJ 11.1.3 as well. I am working with Grails 2.1 and database-migration:1.1.

The database-migration plugin is used to create changelog Groovy Scripts that can be used to migrate a Database at point X in time to be compatible with new code changes you have made to your Grails App.

For instance, if your Grails App is in production today, with your Domain Classes, tables, etc. and you run grails dbm-create-changelog changelog.groovy, this will give you a baseline changelog.groovy script. Then you should run grails dbm-changelog-sync to indicate that you are up-to-date.

Let's say that you have added new Domain Classes and modified fields on existing ones. If you have been keeping up your changesets and you run grails dbm-update, the Database Migration plugin will update your database schema based on those changesets.

Here is an excellent tutorial (not mine) that I am reading/following to learn more about the database-migration plugin: Grails DB-Migration Plugin Tutorial

Monarchism answered 20/8, 2012 at 19:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.