Project

General

Profile

« Previous | Next » 

Revision 3b6475bb

Added by Marc Dequènes about 12 years ago

  • ID 3b6475bb5fc839146c63229bdb617309b51ab7e4

[evol] updated schema

View differences:

db/schema.rb
13 13

  
14 14
  create_table "artwork_conditions", :force => true do |t|
15 15
    t.string  "name",     :limit => 64, :null => false
16
    t.integer "position", :limit => 11, :null => false
16
    t.integer "position",               :null => false
17 17
  end
18 18

  
19 19
  add_index "artwork_conditions", ["name"], :name => "nom", :unique => true
20 20

  
21 21
  create_table "artwork_groups", :force => true do |t|
22 22
    t.string   "name",           :limit => 128, :null => false
23
    t.integer  "artwork_set_id", :limit => 11,  :null => false
23
    t.integer  "artwork_set_id", :limit => 8,   :null => false
24 24
    t.datetime "created_at"
25 25
    t.datetime "updated_at"
26 26
    t.text     "comment"
......
37 37
  add_index "artwork_materials", ["name"], :name => "nom_2"
38 38

  
39 39
  create_table "artwork_materials_artworks", :id => false, :force => true do |t|
40
    t.integer "artwork_id",          :limit => 10, :null => false
41
    t.integer "artwork_material_id", :limit => 10, :null => false
40
    t.integer "artwork_id",          :limit => 8, :null => false
41
    t.integer "artwork_material_id",              :null => false
42 42
  end
43 43

  
44 44
  add_index "artwork_materials_artworks", ["artwork_material_id", "artwork_id"], :name => "artwork_material_id", :unique => true
......
60 60
  add_index "artwork_sets", ["name"], :name => "nom_2"
61 61

  
62 62
  create_table "artwork_sizes", :force => true do |t|
63
    t.integer "height",   :limit => 10,                    :null => false
64
    t.integer "width",    :limit => 10,                    :null => false
65
    t.boolean "standard",               :default => false, :null => false
63
    t.integer "height",                      :null => false
64
    t.integer "width",                       :null => false
65
    t.boolean "standard", :default => false, :null => false
66 66
  end
67 67

  
68 68
  add_index "artwork_sizes", ["height", "width"], :name => "proportion", :unique => true
......
70 70
  create_table "artwork_steps", :force => true do |t|
71 71
    t.string   "filename",     :limit => 512, :null => false
72 72
    t.date     "date"
73
    t.integer  "artwork_id",   :limit => 20
73
    t.integer  "position",     :limit => 1,   :null => false
74
    t.integer  "artwork_id",   :limit => 8
74 75
    t.datetime "created_at"
75 76
    t.datetime "updated_at"
76
    t.integer  "size",         :limit => 20,  :null => false
77
    t.integer  "size",         :limit => 8,   :null => false
77 78
    t.string   "content_type", :limit => 64,  :null => false
78
    t.integer  "height",       :limit => 11,  :null => false
79
    t.integer  "width",        :limit => 11,  :null => false
80
    t.integer  "parent_id",    :limit => 20
79
    t.integer  "height",                      :null => false
80
    t.integer  "width",                       :null => false
81
    t.integer  "parent_id",    :limit => 8
81 82
    t.string   "thumbnail",    :limit => 64
82 83
    t.string   "type",         :limit => 64,  :null => false
83 84
    t.string   "comment",      :limit => 512
......
94 95
  add_index "artwork_supports", ["name"], :name => "nom_2"
95 96

  
96 97
  create_table "artwork_supports_artworks", :id => false, :force => true do |t|
97
    t.integer "artwork_support_id", :limit => 10, :null => false
98
    t.integer "artwork_id",         :limit => 20, :null => false
98
    t.integer "artwork_support_id",              :null => false
99
    t.integer "artwork_id",         :limit => 8, :null => false
99 100
  end
100 101

  
101 102
  add_index "artwork_supports_artworks", ["artwork_support_id", "artwork_id"], :name => "artwork_support_id", :unique => true
102 103

  
103 104
  create_table "artworks", :force => true do |t|
104
    t.integer  "artwork_set_id",              :limit => 20
105
    t.integer  "artwork_set_id",              :limit => 8
105 106
    t.string   "artwork_set_position",        :limit => 32
106
    t.integer  "artwork_group_id",            :limit => 20
107
    t.integer  "artwork_group_id",            :limit => 8
107 108
    t.string   "artwork_group_position",      :limit => 32
108 109
    t.string   "title",                       :limit => 256, :null => false
109
    t.integer  "artwork_size_id",             :limit => 10,  :null => false
110
    t.integer  "artwork_condition_id",        :limit => 10,  :null => false
111
    t.integer  "artwork_placement_reason_id", :limit => 10
110
    t.integer  "artwork_size_id",                            :null => false
111
    t.integer  "artwork_condition_id",                       :null => false
112
    t.integer  "artwork_placement_reason_id"
112 113
    t.string   "placement_location",          :limit => 256
113 114
    t.date     "placement_date"
114 115
    t.text     "comment"
......
116 117
    t.datetime "updated_at"
117 118
  end
118 119

  
119
  create_table "exhibition_artwork", :force => true do |t|
120
    t.integer "exhibition_id", :limit => 20, :null => false
121
    t.integer "artwork_id",    :limit => 20, :null => false
122
    t.integer "position",      :limit => 20, :null => false
120
  create_table "artworks_tags", :id => false, :force => true do |t|
121
    t.integer "tag_id",                  :null => false
122
    t.integer "artwork_id", :limit => 8, :null => false
123 123
  end
124 124

  
125
  add_index "exhibition_artwork", ["exhibition_id", "artwork_id"], :name => "exhibition_id", :unique => true
125
  add_index "artworks_tags", ["tag_id", "artwork_id"], :name => "tag_id", :unique => true
126 126

  
127 127
  create_table "exhibitions", :force => true do |t|
128 128
    t.string   "name",       :limit => 128,                    :null => false
......
137 137
  add_index "exhibitions", ["name"], :name => "nom", :unique => true
138 138
  add_index "exhibitions", ["name"], :name => "nom_2"
139 139

  
140
  create_table "exhibitions_artworks", :id => false, :force => true do |t|
141
    t.integer "exhibition_id", :limit => 8, :null => false
142
    t.integer "artwork_id",    :limit => 8, :null => false
143
    t.integer "position",      :limit => 8, :null => false
144
  end
145

  
146
  add_index "exhibitions_artworks", ["exhibition_id", "artwork_id"], :name => "exhibition_id", :unique => true
147

  
140 148
  create_table "sessions", :force => true do |t|
141 149
    t.string   "session_id", :null => false
142 150
    t.text     "data"
......
147 155
  add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
148 156
  add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
149 157

  
158
  create_table "tags", :force => true do |t|
159
    t.string "name", :limit => 32, :null => false
160
  end
161

  
150 162
  create_table "users", :force => true do |t|
151 163
    t.string   "login",             :limit => 64,                     :null => false
152 164
    t.string   "real_name",         :limit => 256

Also available in: Unified diff