Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changelog changelog.groovy not found

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?

like image 307
Edward Ruchevits Avatar asked Aug 19 '12 23:08

Edward Ruchevits


1 Answers

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

like image 96
Philip Tenn Avatar answered Nov 10 '22 22:11

Philip Tenn