Database Migration plugin add data

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Database Migration plugin add data

sethfuller
Can the Database Migration plugin insert data rows and delete data rows from tables?
Reply | Threaded
Open this post in threaded view
|

Re: Database Migration plugin add data

Burt Beckwith
Administrator
Liquibase doesn't directly support it, but you can do inserts and deletes with groovy.sql.Sql.

Burt

> Can the Database Migration plugin insert data rows and delete data rows from
> tables?
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://grails-plugins.847840.n3.nabble.com/Database-Migration-plugin-add-data-tp3362315p3362315.html
> To start a new topic under Grails Plugins, email [hidden email]
> To unsubscribe from Grails Plugins, visit
Reply | Threaded
Open this post in threaded view
|

Re: Database Migration plugin add data

sethfuller
Does that file go in the migrations directory and is its name groovy.sql.Sql? Does the database migration plugin automatically run this file? There is probably no versioning with this file so it would get run each time and you would have to remove it or empty after doing some inserts or deletes, true?

Thanks for the quick reply.
Reply | Threaded
Open this post in threaded view
|

Re: Database Migration plugin add data

sethfuller
Sorry I see that groovy.sql.Sql is a Groovy class.
Reply | Threaded
Open this post in threaded view
|

Re: Database Migration plugin add data

Craig Sherstan
I realise this thread is old, but it sure looks like the current liquibase supports inserting data: http://www.liquibase.org/manual/insert_data