简体   繁体   中英

Subsonic DB Schema Generation

I was watching subsonic's simple repository demo. I came to know that DB schema can be generated from code. I think of code generation as usually domain layer from database. Where is this useful?

The simple repository generates a database from DTO objects and in contrast if you use the ActiveRecord templates the data layer is generated from an existing db.

For small or new projects with little changes to the database the simple repository is fine but for a larger DB or if you start to migrate an existing project with a grown DB to subsonic you would probably be happier with ActiveRecord.

I would recommend using the ActiveRecord approach and additionally use the migration tool from subsonic 2 for further changes to the DB (it can be used independently from subsonic 2 since it's a standalone tool).

Defining SubSonic 3 ActiveRecord migrations

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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