@@ -0,0 +1,943 @@
+# Copyright (C) 2017 Google Inc.%0A# Licensed under http://www.apache.org/licenses/LICENSE-2.0 %3Csee LICENSE file%3E%0A%0A%22%22%22%0AMigrate requests change logs%0A%0ACreate Date: 2017-01-30 06:04:09.538516%0A%22%22%22%0A# disable Invalid constant name pylint warning for mandatory Alembic variables.%0A# pylint: disable=invalid-name%0A%0Afrom alembic import op%0A%0A%0A# revision identifiers, used by Alembic.%0Arevision = '57940269e30'%0Adown_revision = '562ec606ff7c'%0A%0A%0Adef upgrade():%0A  %22%22%22Upgrade database schema and/or data, creating a new revision.%22%22%22%0A  op.execute(%22%22%22%0A      update revisions%0A             join requests on revisions.resource_type = 'Request' and%0A                              revisions.resource_id = requests.id%0A             join assessments on requests.slug = assessments.slug%0A      set resource_type = 'Assessment',%0A          resource_id = assessments.id%0A  %22%22%22)%0A%0A%0Adef downgrade():%0A  %22%22%22Downgrade database schema and/or data back to the previous revision.%22%22%22%0A  pass%0A

Migrate Request revisions to Assessment revisions