You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py Web Framework
When I try to drop or truncate a table I get this error:
ProgrammingError: cannot drop table dump because other objects depend
on it
HINT: Use DROP ... CASCADE to drop the dependent objects too.
Deleting from the table works fine because the deletions cascade. Is
there a way to truncate or drop tables through the DAL that have
foreign key dependencies?
Baron
mdipierro
unread,
Feb 3, 2009, 11:28:54 PM2/3/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py Web Framework
sorry, for now you have to do it manually
db.executesql('DROP TABLE tablename CASCADE;')
perhaps I can add an option to drop/truncate.
Massimo
Baron
unread,
Feb 4, 2009, 12:40:47 AM2/4/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py Web Framework
thanks Massimo.
mdipierro
unread,
Feb 4, 2009, 1:17:14 AM2/4/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py Web Framework
give this a try. In trunk
db.table.drop('cascade')
Massimo Di Pierro
unread,
Jan 8, 2013, 12:35:43 PM1/8/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web...@googlegroups.com
What do you get? An error? What error?
On Friday, January 4, 2013 3:18:32 AM UTC-6, Liang wrote:
drop('cascade') seems not working.
Liang Yi Aris
unread,
Jan 8, 2013, 9:14:23 PM1/8/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web...@googlegroups.com
No error shown in the interactive shell after executing the command. But the tables in the database are still there. I use Postgresql 9.2.
--
Massimo Di Pierro
unread,
Jan 9, 2013, 10:13:46 AM1/9/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message