change table:delete to table:delete!