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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
# File 'lib/copycats/schema.rb', line 18
def up
ActiveRecord::Schema.define do
create_table :kitties do |t|
t.string :name t.string :genes_kai, null: false t.integer :gen, null: false t.datetime :birthdate, null: false
t.integer :day_count, null: false
t.references :matron t.references :sire
t.boolean :is_fancy, null: false, default: false
t.boolean :is_exclusive, null: false, default: false
t.boolean :is_founder, null: false, default: false
t.references :body, null: false t.references :pattern, null: false t.references :coloreyes, null: false t.references :eyes, null: false t.references :color1, null: false t.references :color2, null: false t.references :color3, null: false t.references :wild, null: false t.references :mouth, null: false end
create_table :genes do |t|
t.references :kitty, null: false
t.integer :n, null: false
t.string :gene, null: false t.integer :gene_n, null: false
t.references :trait, null: false
end
create_table :traits do |t|
t.references :trait_type, null: false
t.string :name, null: false
t.integer :n, null: false t.string :kai, null: false t.integer :tier end
create_table :trait_types do |t|
t.string :name, null: false t.string :key, null: false end
end
end
|