Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #124 (closed enhancement: invalid)

Opened 14 years ago

Last modified 12 years ago

Generate model code (from SQLObject classes) CatWalk

Reported by: Ronald Jaramillo Owned by: Ronald Jaramillo
Priority: normal Milestone: 1.0
Component: Toolbox Version:
Severity: normal Keywords: Catwalk


bonono ask on the list: Would it be possible to add a "generate model code" feature in catwalk ? For those who have their model definition all done in TurboGears, this may sounds redundent but for people who use existing RDBMS(where the definition is already done by some DBA), this can be handy.

I have an usage scenario that the app use centralized postgresql database(thus the _fromdatabase in SQLObject is very hande) but I need a shrinked portable version using SQLite(so the apps can be put on a notebook for demo) which SQLObject doesn't have the _fromdatabase feature. It ends up I still need to hand code all the columns definitions for SQLObject class. Syncing between the centralized DB definition and this becomes an issue.

Change History

comment:1 Changed 13 years ago by TML

If you are looking for SQL to generate your database schema, try "tg-admin sql sql" while your app is pointed at the postgresql database.

comment:2 Changed 13 years ago by jorge.vargas

  • Status changed from new to closed
  • Resolution set to invalid

Two things

1- _fromdatabase is deprecated use

Class Foo(SQLObject):
    class sqlmeta:

2- I believe this is not supported in SQLObject due to sqlite not having the facility to read tables "from the database"

As for the ticket itself there is now modelDesigner so I believe this should be close.

Note: See TracTickets for help on using tickets.