Automatic database generation and migration using Perl

In Ror or Django or web2py, you can “describe” the database (as a set of classes that can be reinstalled on tables), and the structure (provided with a connection string to the required database) generates tables, fields, relations, and in the case of RoR and web2py it also retains relevance (for example, deleting a class causes the table to be dropped, adding a property to the trigger of the class "adding an alternative table", etc.).

Is there any Perl module that does the same? For example, does it accept the YAML / XML / JSON database description as input and modify / generate the database schema accordingly?

+3
source share
2 answers

Yes, the SQL module :: Translator :: Parser :: YAML , and here are some documentation

+3
source

I have a GPL project with an alpha version that does this. Although it is written in PHP, it can be called from Perl:

System ("/path/to/triBuilder.php --yaml = ....");

http://code.google.com/p/triangulum-db/

-2
source

Source: https://habr.com/ru/post/1742011/


All Articles