How to generate DDL using PetaPoco or NPoco?
c#, npoco, petapoco, poco
Solution
No. PetaPoco seems (rightly) intent on staying small and lightweight, focusing on one thing (mapping between objects and IDb* concepts) and doing that well.
I could see this feature being semi-useful when running unit tests or very useful for prototyping, but IMO you want a DB migration manager to handle updates to your DB schema over time. Fluent Migrator is a good choice.
For me, it's about a separation of where we are (current PetaPoco / NPoco classes) and how we got here (migrations).
Problem
I have just started using PetaPoco/NPoco in one of my projects and have to say that it rocks however, It seems that the library is not able to generate DDL and create a table based on the Poco. I know that OrmLite can do this. Is there a way/workaround that can be used to for example decorate the poco and then based on the attributes DBMS specific table scripts are generated? e.g. Oracle, MSSql etc. Thank you