exports.up = function (knex, Promise) {
  return knex.schema.createTableIfNotExists('relationships', function (table) {
    table.increments('id')
    table.string('relationshipType')
    table.integer('source')
    table.integer('target')
  })
}

exports.down = function (knex, Promise) {
  return knex.schema.dropTableIfExists('relationships')
}

@@ -202,16 +202,42 @@
 ('source
+Id').references('agents.id
 ')%0A    t
@@ -256,16 +256,42 @@
 ('target
+Id').references('agents.id
 ')%0A  %7D)%0A

rename source to sourceId, same for target