How to import or convert a sql script into Grails domain classes -
i have database schema exported sql script. wonder if there grails command create automatically domain clases (.groovy) getting data sql script.
this extract of script database.sql:
create table if not exists `alojamiento`.`usuario` ( `id` int not null , `nombre_usuario` varchar(45) null , `password` varchar(45) null , `nombre` varchar(45) null , primary key (`id`) ) engine = innodb; -- ----------------------------------------------------- -- table `alojamiento`.`localidad` -- ----------------------------------------------------- create table if not exists `alojamiento`.`localidad` ( `id` int not null , primary key (`id`) ) (...)
you should use db-reverse-engineer plugin generate domain classes database.
Comments
Post a Comment