Table Of Contents

Create the DatabaseΒΆ

Table of Contents

TurboGears now has enough information to generate the newly defined tables using the database specified in dev.cfg. To generate the tables, run:

$ tg-admin sql create

If there were no errors, then your tables were successfully created.

If you need to change your table definitions, make sure to drop whatever is currently in your database first. To remake your tables, run:

$ tg-admin sql drop
$ tg-admin sql create

Note

SQLAlchemy/Elixir users can’t use the sql drop command. You need to delete the database manually.