1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
table! {
    schools (id) {
        id -> Int4,
        fire -> Nullable<Int4>,
        protection -> Nullable<Int4>,
        light -> Nullable<Int4>,
        detection -> Nullable<Int4>,
        strengthening -> Nullable<Int4>,
        metamorphism -> Nullable<Int4>,
        bann -> Nullable<Int4>,
        illusion -> Nullable<Int4>,
        movement -> Nullable<Int4>,
        wind -> Nullable<Int4>,
        heal -> Nullable<Int4>,
        death -> Nullable<Int4>,
        fate -> Nullable<Int4>,
        nature -> Nullable<Int4>,
        control -> Nullable<Int4>,
        fight -> Nullable<Int4>,
        water -> Nullable<Int4>,
        shadow -> Nullable<Int4>,
        earth -> Nullable<Int4>,
    }
}

table! {
    spells (id) {
        id -> Int4,
        name -> Varchar,
        cast_duration -> Varchar,
        options -> Array<Text>,
        range -> Varchar,
        difficulty -> Varchar,
        typus -> Varchar,
        enforced -> Varchar,
        effect -> Text,
        duration_of_effect -> Varchar,
        cost -> Varchar,
        schools_id -> Int4,
    }
}

joinable!(spells -> schools (schools_id));

allow_tables_to_appear_in_same_query!(schools, spells,);