diff --git a/source/structure/r1.sindri.json b/source/structure/r1.sindri.json index 4007f8e..c77573c 100644 --- a/source/structure/r1.sindri.json +++ b/source/structure/r1.sindri.json @@ -90,16 +90,11 @@ ] }, { - "name": "local_resource_events", + "name": "events", "key_field": { "name": "id" }, "data_fields": [ - { - "name": "local_resource_id", - "type": "integer", - "nullable": false - }, { "name": "name", "type": "string_medium", @@ -126,6 +121,24 @@ "nullable": true } ], + "constraints": [ + ] + }, + { + "name": "local_resource_events", + "key_field": null, + "data_fields": [ + { + "name": "local_resource_id", + "type": "integer", + "nullable": false + }, + { + "name": "event_id", + "type": "integer", + "nullable": false + } + ], "constraints": [ { "kind": "foreign_key", @@ -137,6 +150,16 @@ } } } + { + "kind": "foreign_key", + "parameters": { + "fields": ["event_id"], + "reference": { + "name": "events", + "fields": ["id"] + } + } + } ] }, {