On Wed, Aug 20, 2008 at 10:18 AM, Victor Lin <[EMAIL PROTECTED]> wrote:
> I want to drop specific table declared by elixir.
> I found that I can't drop it just like this:
>
> table.drop()
>
> There is no such a method "drop".
Sure there is... on the table (not on the Entity):
given an entity:
class A(Entity):
pass
setup_all()
create_all()
A.table.drop() works fine here.
> I know there is a "drop_all" method, but the only thing I want to do
> is drop one, not all.
> I think methods like drop should be easy done as sqlalchemy is.
>
> So the question is, how to drop a table and recreate it?
A.table.drop()
A.table.create()
But keep in mind it probably (at least I suppose) won't work if you
have other tables with references to the table you drop.
--
Gaƫtan de Menten
http://openhex.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---