Datastore update schema#501
Merged
Merged
Conversation
| @@ -0,0 +1,29 @@ | |||
| import webapp2 | |||
Contributor
There was a problem hiding this comment.
imports should be in 3 sections - standard library, third-party, and (optionally) application/package-local names
This should be:
import os
import time
import jinja2
import webapp2
import update_schema
Contributor
|
@ryanmats finished first round, let me know when you're ready for the next round. |
| from google.appengine.ext import deferred | ||
| from google.appengine.ext import ndb | ||
|
|
||
| import models_v2 |
Contributor
There was a problem hiding this comment.
imports should be in alphabetical order, so v1 should be imported before v2.
…oudPlatform/python-docs-samples into datastore-update-schema
|
|
||
| class AddEntitiesHandler(webapp2.RequestHandler): | ||
| def post(self): | ||
| reload(models_v1) |
Contributor
There was a problem hiding this comment.
Add a comment describing what this does.
| self.response.write(template.render(template_values)) | ||
|
|
||
| app = webapp2.WSGIApplication( | ||
| [('/display_entities', DisplayEntitiesHandler), ]) |
Contributor
There was a problem hiding this comment.
Close, but you can change this indent to just four spaces, e.g.:
app = webapp.WSGIApplication(
[(....Change-Id: I2b1f2299364ce8e5caf7894046916cc2a6140719
Change-Id: I932cf3076c9009c2439d0591b1967bf2fd1fd34c
| update_schema_task, cursor=query.cursor(), num_updated=num_updated) | ||
| else: | ||
| logging.debug( | ||
| 'UpdateSchema complete with {0} updates!'.format(num_updated)) |
Contributor
There was a problem hiding this comment.
Go ahead and change this string to 'update_schema_task complete with {} updates.'.
Change-Id: Id5f70ef3e01b44d5ec44649d467d072b3541e850
Change-Id: I0c0e982bcf6243ec096348423128c17da2ced250
arbrown
pushed a commit
that referenced
this pull request
Nov 7, 2022
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
dandhlee
pushed a commit
that referenced
this pull request
Nov 9, 2022
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Jon - see this pull request for my current code for the database update schema sample.
I seem to be having a problem where adding a second Picture class with more attributes and querying does not seem to change the database schema. However, when I manually update the original Picture class and add the two attributes, then query, it seems to update.