Best way is manually defining migration file names, all the table history
information and diffs are stored in /databases/xxxxxxxxxxx.table which is
randomly named.

You can do:

db.define_table('products',Field('name'),migrate='products.table')


In that way, when you need to purge the table information and history, just
delete the products.table file from /databases folder.





2010/12/28 apple <[email protected]>

> I called define_table to create a table "product". This worked fine.
> Then I called executesql("DROP TABLE PRODUCT"). The product table
> appears to have been dropped from the database. However when I run the
> application again it fails in the model in at the define_table line
> with "OperationalError: no such table: product"
>
> I am able to define_table("product2".....) and db.product2.drop() and
> define_table("product2"....) again. However as soon as I use the
> manual SQL DROP it seems that I cannot use that table name again in
> the database.
>
> Is there somewhere the table names are stored? Is it possible to
> cleanly delete tables outside the DAL using DROP TABLE?
>
>
>


-- 

Bruno Rocha
http://about.me/rochacbruno/bio

Reply via email to