From 2c408648c70614a88c0412faf6d3a00d147379a2 Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Sat, 7 Nov 2020 08:15:37 -0500 Subject: Added category to products. --- dichroism/src/schema.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'dichroism/src/schema.rs') diff --git a/dichroism/src/schema.rs b/dichroism/src/schema.rs index fb59bf6..45501cf 100644 --- a/dichroism/src/schema.rs +++ b/dichroism/src/schema.rs @@ -1,3 +1,10 @@ +table! { + categories (id) { + id -> Integer, + path -> Text, + } +} + table! { photo_sets (id) { id -> Integer, @@ -17,12 +24,15 @@ table! { name -> Text, description -> Text, featured -> Integer, + category -> Integer, } } +joinable!(products -> categories (category)); joinable!(products -> photo_sets (photo_set)); allow_tables_to_appear_in_same_query!( + categories, photo_sets, products, ); -- cgit v1.2.3