Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dump data to yml in Play! Framework

Is there a way to dump data (generated with the CRUD) into a yml data file?

This feature is available in Rails, Django, etc...

I find that the best way to create data and respect relationships is throught the CRUD admin

There's nothing about it in the Play! Yaml Documentation

I will add that it would be nice if possible to dump while using the mem (or fs) databases, though this means it cannot be done with a "play" command but could be done through a special Route maybe?

In short:

  • is there any existing 'dump' code in Play! ?
  • is it possible to dump via a $play dumpdata command?
  • is it possible to dump via special Route?
like image 286
Stefano Avatar asked May 26 '26 05:05

Stefano


1 Answers

Sounds like you want the logisimayml module.

To export your database, simply type this command line :

play yml:generate

You should have a look through the Play Modules page. Lots of great stuff there.

like image 91
Damo Avatar answered May 30 '26 03:05

Damo