简体   繁体   English

使数据库表航行到模型导出

[英]Sails DB tables to models export

I was wondering if there is any way to export the DB tables to Sails Models structure, so i can make a instant replica of a current DB in sails and start using the DB with sails. 我想知道是否有任何方法可以将数据库表导出到Sails Models结构中,这样我就可以在Sails中立即复制当前数据库,并开始在Sails中使用该DB。

Its kinds of reverse migration. 各种反向迁移。 (DB -> SAILS) (DB-> SAILS)

Yes as of only just a couple of weeks now a module has been created to do this for you. 是的,到目前为止,仅几个星期就创建了一个模块来为您执行此操作。 At present it is limited to only a couple of database types eg postgresql and mySql however the publisher seems to be actively working on new database conversions also. 目前,它仅限于几种数据库类型,例如postgresql和mySql,但是发布者似乎也在积极地进行新的数据库转换。

To find all the info check here: 要查找所有信息,请在此处检查:

https://www.npmjs.com/package/sails-inverse-model https://www.npmjs.com/package/sails-inverse-model

I have used it to convert 53 postgresql tables to sails models. 我用它来将53个postgresql表转换为sails模型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM