On Thursday, September 25, 2014 1:21:33 PM UTC-4, tonthon wrote: > > 1- Use something like sqlautocode to dynamically build models regarding > your existing database structure > 2- Migrate tables to fit your declared models > 3- Delete your tables > > You'll use 1 and 2 if you'd like to keep the datas stored in the > existing tables. >
I assume you know SQL and are comfortable with it, since you already created tables in Postgres -- so I think you'll probably have an easier time going with method 1 or 2. initializedb is really for people who are not comfortable with sql, and would prefer a "hook" where they can write everything in Python. since Pyramid uses SqlAlchemy (or ZODB), you don't need to use Pyramid when dealing with your models. this might sound weird, but in things like Django and Rails, the ORM is part of the framework -- so you need to use framework when doing anything with the database. if you don't include any pyramid code in your models.py (which most people recommend) then you can write maintenance tools, analytics, database population, etc only using small SqlAlchemy scripts and importing your models.py file -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.