@@ -0,0 +1,1996 @@
+# Copyright (C) 2016 Google Inc., authors, and contributors %3Csee AUTHORS file%3E%0A# Licensed under http://www.apache.org/licenses/LICENSE-2.0 %3Csee LICENSE file%3E%0A# Created By: urban@reciprocitylabs.com%0A# Maintained By: urban@reciprocitylabs.com%0A%0A%22%22%22%0AAdd assessors reminder notification%0A%0ACreate Date: 2016-04-12 13:44:48.265193%0A%22%22%22%0A# disable Invalid constant name pylint warning for mandatory Alembic variables.%0A# pylint: disable=invalid-name%0A%0Aimport sqlalchemy as sa%0Afrom sqlalchemy.sql import column%0Afrom sqlalchemy.sql import table%0Afrom sqlalchemy.sql import select%0Afrom alembic import op%0A%0A%0A# revision identifiers, used by Alembic.%0Arevision = '11cee57a4149'%0Adown_revision = '50c374901d42'%0A%0Anotifications_table = table(%0A    'notifications',%0A    column('id', sa.Integer),%0A    column('notification_type_id', sa.Integer),%0A)%0A%0Anotification_types_table = table(%0A    'notification_types',%0A    column('id', sa.Integer),%0A    column('name', sa.String),%0A    column('description', sa.Text),%0A    column('template', sa.String),%0A    column('instant', sa.Boolean),%0A    column('advance_notice', sa.Integer)%0A)%0A%0A%0Adef upgrade():%0A  %22%22%22Inserts new notification type%22%22%22%0A  op.bulk_insert(%0A      notification_types_table,%0A      %5B%7B%0A          %22name%22: %22assessment_assessor_reminder%22,%0A          %22description%22: (%22Notify all Assessors that they should take a look %22%0A                          %22at the assessment.%22),%0A          %22template%22: %22%22,%0A          %22advance_notice%22: 0,%0A          %22instant%22: False%0A      %7D%5D%0A  )%0A%0A%0Adef downgrade():%0A  %22%22%22First removes notifications and then removes notification type%22%22%22%0A  op.execute(%0A      notifications_table.delete().where(%0A          notifications_table.c.notification_type_id == select(%0A              %5Bnotification_types_table.c.id%5D).where(%0A              notification_types_table.c.name == %22assessment_assessor_reminder%22%0A          )%0A      )%0A  )%0A%0A  op.execute(%0A      notification_types_table.delete().where(%0A          notification_types_table.c.name == %22assessment_assessor_reminder%22%0A      )%0A  )%0A

Add new notification type for assessors reminder