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 #1418 (closed enhancement: fixed)

Opened 12 years ago

Last modified 11 years ago

Improve "tg-admin sql" for SQLAlchemy

Reported by: paj Owned by: paj
Priority: normal Milestone: 1.5
Component: SQLAlchemy Version: 1.0.2
Severity: normal Keywords:


Currently "tg-admin sql" only supports create for SQLAlchemy - SQLObject supports more functions. The important ones missing are (IMHO) "tg-admin sql sql" and "tg-admin sql status".

Change History

comment:1 Changed 12 years ago by paj

  • Type changed from defect to enhancement

comment:2 Changed 12 years ago by paj

  • Owner changed from anonymous to paj

This is the SO util's help:

Available commands:
  (use "tg-admin-script.py help COMMAND" or "tg-admin-script.py COMMAND -h"
  for more information)
create:  Create tables
drop:    Drop tables
execute: Execute SQL statements
help:    Show help
list:    Show all SQLObject classes found
record:  Record historical information about the database status
sql:     Show SQL CREATE statements
status:  Show status of classes vs. database
upgrade: Update the database to a new version (as created by record)

I'm finishing off a script that does most of these. I going to omit drop as it's potentially dangerous (and rarely needed), and sql as you can do "create -n" equivalently. Also, I'm not going to attempt record or upgrade - that would involve using the Migrate project.

comment:3 Changed 12 years ago by paj

We'll have to hold on "create -n" for now, the SA internals make this difficult to do. Otherwise good to go, a preliminary version is in [3446] and [3447]. This will need some beta testing, so leaving ticket open for now.

comment:4 Changed 11 years ago by faide

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.