Deleting data models????

4 views
Skip to first unread message

gg

unread,
Apr 11, 2008, 10:16:31 PM4/11/08
to Google App Engine
I am sure I am missing something but once a data model instance is
created, How can you delete it? I understand how to delete instances
with db.delete() but can't figure out how to delete a model from the
data store. Same problem seems to exist in the dataviewer GUI. You can
delete the instances (rows) but not the whole model (table)? Any
help....

Josh Flanagan

unread,
Apr 11, 2008, 11:11:19 PM4/11/08
to google-a...@googlegroups.com
From what I understand, there really is no underlying model/table. If
you delete all the instances, you've deleted everything.
As someone else previously posted, if you want to delete everything, do:

for instance in MyModel.all()
instance.delete()

gg

unread,
Apr 11, 2008, 11:52:18 PM4/11/08
to Google App Engine
Well I actually tried to delete all the instances from a single model
via the dataviewer and I crashed it : ) now all I get when I try to
view my data with the dataviewer is a server error page.....

On Apr 11, 8:11 pm, "Josh Flanagan" <joshuaflana...@gmail.com> wrote:
> From what I understand, there really is no underlying model/table. If
> you delete all the instances, you've deleted everything.
> As someone else previously posted, if you want to delete everything, do:
>
> for instance in MyModel.all()
> instance.delete()
>

Josh Flanagan

unread,
Apr 11, 2008, 11:56:53 PM4/11/08
to google-a...@googlegroups.com
Is that happening in production? Either way, you should probably
submit it as an issue in the issue tracker.
http://code.google.com/p/googleappengine/issues/list

If you are working in your local dev environment, you can always start
dev_appserver with the --clear_datastore parameter to wipe out all of
your data.

gg

unread,
Apr 12, 2008, 12:56:57 AM4/12/08
to Google App Engine
Yes it did happen in production (no dataviewer for dev)... And I did
file it workaround was to re-bulk upload data with same model
name....

On Apr 11, 8:56 pm, "Josh Flanagan" <joshuaflana...@gmail.com> wrote:
> Is that happening in production? Either way, you should probably
> submit it as an issue in the issue tracker.http://code.google.com/p/googleappengine/issues/list
>
> If you are working in your local dev environment, you can always start
> dev_appserver with the --clear_datastore parameter to wipe out all of
> your data.
>

Josh Flanagan

unread,
Apr 12, 2008, 9:36:43 AM4/12/08
to google-a...@googlegroups.com
There is a data viewer in dev (I do not know how it compares to production):
http://localhost:8080/_ah/admin/datastore
Reply all
Reply to author
Forward
0 new messages