{"body":"MBP-de-Fernando:test-altreus fernando$ cat Schema.pm6 \nuse Red;\n\nmodel Organisation is rw {\n    has Int   $.id        is id;\n    has       @.students  is relationship({.org-id }, :model<Student>, :require<Schema>);\n}\n\nmodel Student is rw {\n    has Str   $.email     is id;\n    has Str   $.name      is column;\n    has Int   $!org-id    is referencing{ :model<Organisation>, :require<Schema>, :column<id> };\n\n    has       $.org       is relationship({ .id }, :model<Organisation>, :require<Schema>);\n}\nMBP-de-Fernando:test-altreus fernando$ perl6 -e '\nuse lib \".\";\n\nuse Red;\nuse Schema;\n\nmy $*RED-DB = database \"SQLite\", :database<./hootboxes.db>;\n\nOrganisation.^create-table: :if-not-exists;\nStudent.^create-table: :if-not-exists;\n\n'\nMBP-de-Fernando:test-altreus fernando$","name":"","extension":"txt","url":"https://www.irccloud.com/pastebin/aI8O8mug","modified":1559251069,"id":"aI8O8mug","size":773,"lines":28,"own_paste":false,"theme":"","date":1559251069}