I have 2 issues.
There is no
joinable!entry for "categories" in the schema.rs, why does this happen?if 2 columns are added with foreign key reference to the same table, it doesn't allow me to add two
joinable!statements manually , eg:joinable!(categories -> users (created_by)); joinable!(categories -> users (modified_by));
I tried creating the "categories" table with one foreign key reference to the "users" table, dropped database, deleted schema.rs , ran migration , still no change to the schema.
table! {
categories (id) {
id -> Int4,
category_code -> Varchar,
description -> Varchar,
gl_cr -> Varchar,
gl_dr -> Varchar,
asset_cost_less_than -> Nullable<Int4>,
over_ride_depreciation_rate -> Bool,
over_ride_useful_life -> Bool,
created_by -> Int4,
created_on -> Timestamp,
modified_by -> Nullable<Int4>,
modified_date -> Nullable<Timestamp>,
}
}
table! {
users (id) {
id -> Int4,
username -> Varchar,
full_name -> Varchar,
email -> Varchar,
active -> Bool,
created_on -> Timestamp,
}
}
part of the schema.rs is
joinable!(branch_categories -> categories (category_id));
joinable!(branches -> cities (city_id));
joinable!(branches -> users (created_by));
joinable!(category_book_rate_codes -> books (book_id));
joinable!(category_book_rate_codes -> categories (category_id));
joinable!(category_book_rate_codes -> depreciation_rates (rate_id));
joinable!(cities -> states (state_id));
joinable!(cities -> users (created_by));