def upgrade():
    """Upgrade database schema and/or data, creating a new revision."""
    cleanup.delete(op, "task_group_objects", "object_type", value="Meeting")
    cleanup.delete(op,
                   "task_group_objects",
                   "object_type",
                   value="ObjectEvent")
def upgrade():
    """Upgrade database schema and/or data, creating a new revision."""
    op.execute("DROP TABLE `requests`")

    replace(op,
            "audits",
            "object_type",
            old_value="Request",
            new_value="Assessment")

    deletions_required = (
        ("audit_objects", "auditable_type"),
        ("custom_attribute_definitions", "definition_type"),
        ("fulltext_record_properties", "type"),
        ("notifications", "object_type"),
        ("object_documents", "documentable_type"),
        ("object_owners", "ownable_type"),
        ("object_people", "personable_type"),
        ("relationships", "source_type"),
        ("relationships", "destination_type"),
        ("revisions", "resource_type"),
        ("revisions", "source_type"),
        ("revisions", "destination_type"),
    )

    for table, field in deletions_required:
        delete(op, table, field, value="Request")
示例#3
0
def upgrade():
  """Upgrade database schema and/or data, creating a new revision."""
  op.execute("DROP TABLE `requests`")

  replace(op, "audits", "object_type",
          old_value="Request", new_value="Assessment")

  deletions_required = (
      ("audit_objects", "auditable_type"),
      ("custom_attribute_definitions", "definition_type"),
      ("fulltext_record_properties", "type"),
      ("notifications", "object_type"),
      ("object_documents", "documentable_type"),
      ("object_owners", "ownable_type"),
      ("object_people", "personable_type"),
      ("relationships", "source_type"),
      ("relationships", "destination_type"),
      ("revisions", "resource_type"),
      ("revisions", "source_type"),
      ("revisions", "destination_type"),
  )

  for table, field in deletions_required:
    delete(op, table, field, value="Request")
示例#4
0
def upgrade():
  """Upgrade database schema and/or data, creating a new revision."""
  for table, field in DELETIONS:
    cleanup.delete(op, table, field, value="Meeting")
    cleanup.delete(op, table, field, value="ObjectEvent")
示例#5
0
def upgrade():
  """Upgrade database schema and/or data, creating a new revision."""
  delete(op, "task_group_objects", "object_type", value="Request")
示例#6
0
def upgrade():
  """Upgrade database schema and/or data, creating a new revision."""
  cleanup.delete(op, "task_group_objects", "object_type", value="Meeting")
  cleanup.delete(op, "task_group_objects", "object_type", value="ObjectEvent")
def upgrade():
    """Upgrade database schema and/or data, creating a new revision."""
    for table, field in DELETIONS:
        cleanup.delete(op, table, field, value="Meeting")
        cleanup.delete(op, table, field, value="ObjectEvent")