django - How to create a new model (kind) in google cloud Datastore -


i using google cloud datastore(not ndb) project.

python2.7 , django.

i want create new model, lets tag model.

class tag(db.model):     name = ndb.stringproperty()     feature = ndb.stringproperty(default='') 

i have added property model many times, not yet created new model.

my question when have changed model schema in django project using mysql, executed manage.py migrate.

do have execute migration command datastore well?

or defining model have do?

thanks in advance!

unlike sql databases mysql, cloud datastore doesn't require create kinds (similar tables) in advance. other defining in code, no admin steps required create kind.

when write first entity of kind, it's created implicitly you.

you can query kinds don't exist yet without error, you'll no entities back:

example gql statement on kind doesn't exist, shows message of "no entities matched query"


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -