Project

General

Profile

Download (7.38 KB) Statistics
| Branch: | Tag: | Revision:

root / db / schema.rb @ 3b6475bb

1
# This file is auto-generated from the current state of the database. Instead of editing this file, 
2
# please use the migrations feature of Active Record to incrementally modify your database, and
3
# then regenerate this schema definition.
4
#
5
# Note that this schema.rb definition is the authoritative source for your database schema. If you need
6
# to create the application database on another system, you should be using db:schema:load, not running
7
# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
8
# you'll amass, the slower it'll run and the greater likelihood for issues).
9
#
10
# It's strongly recommended to check this file into your version control system.
11

    
12
ActiveRecord::Schema.define(:version => 20090411170814) do
13

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

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

    
21
  create_table "artwork_groups", :force => true do |t|
22
    t.string   "name",           :limit => 128, :null => false
23
    t.integer  "artwork_set_id", :limit => 8,   :null => false
24
    t.datetime "created_at"
25
    t.datetime "updated_at"
26
    t.text     "comment"
27
  end
28

    
29
  add_index "artwork_groups", ["name"], :name => "nom", :unique => true
30
  add_index "artwork_groups", ["name"], :name => "nom_2"
31

    
32
  create_table "artwork_materials", :force => true do |t|
33
    t.string "name", :limit => 128, :null => false
34
  end
35

    
36
  add_index "artwork_materials", ["name"], :name => "nom", :unique => true
37
  add_index "artwork_materials", ["name"], :name => "nom_2"
38

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

    
44
  add_index "artwork_materials_artworks", ["artwork_material_id", "artwork_id"], :name => "artwork_material_id", :unique => true
45

    
46
  create_table "artwork_placement_reasons", :force => true do |t|
47
    t.string "name", :limit => 64, :null => false
48
  end
49

    
50
  add_index "artwork_placement_reasons", ["name"], :name => "nom", :unique => true
51

    
52
  create_table "artwork_sets", :force => true do |t|
53
    t.string   "name",       :limit => 128, :null => false
54
    t.datetime "created_at"
55
    t.datetime "updated_at"
56
    t.text     "comment"
57
  end
58

    
59
  add_index "artwork_sets", ["name"], :name => "nom", :unique => true
60
  add_index "artwork_sets", ["name"], :name => "nom_2"
61

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

    
68
  add_index "artwork_sizes", ["height", "width"], :name => "proportion", :unique => true
69

    
70
  create_table "artwork_steps", :force => true do |t|
71
    t.string   "filename",     :limit => 512, :null => false
72
    t.date     "date"
73
    t.integer  "position",     :limit => 1,   :null => false
74
    t.integer  "artwork_id",   :limit => 8
75
    t.datetime "created_at"
76
    t.datetime "updated_at"
77
    t.integer  "size",         :limit => 8,   :null => false
78
    t.string   "content_type", :limit => 64,  :null => false
79
    t.integer  "height",                      :null => false
80
    t.integer  "width",                       :null => false
81
    t.integer  "parent_id",    :limit => 8
82
    t.string   "thumbnail",    :limit => 64
83
    t.string   "type",         :limit => 64,  :null => false
84
    t.string   "comment",      :limit => 512
85
  end
86

    
87
  add_index "artwork_steps", ["filename"], :name => "image_filename", :unique => true
88

    
89
  create_table "artwork_supports", :force => true do |t|
90
    t.string "name",    :limit => 128, :null => false
91
    t.string "acronym", :limit => 8
92
  end
93

    
94
  add_index "artwork_supports", ["name", "acronym"], :name => "nom", :unique => true
95
  add_index "artwork_supports", ["name"], :name => "nom_2"
96

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

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

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

    
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
  end
124

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

    
127
  create_table "exhibitions", :force => true do |t|
128
    t.string   "name",       :limit => 128,                    :null => false
129
    t.date     "start",                                        :null => false
130
    t.date     "end",                                          :null => false
131
    t.string   "place",      :limit => 128,                    :null => false
132
    t.boolean  "hidden",                    :default => false, :null => false
133
    t.datetime "created_at"
134
    t.datetime "updated_at"
135
  end
136

    
137
  add_index "exhibitions", ["name"], :name => "nom", :unique => true
138
  add_index "exhibitions", ["name"], :name => "nom_2"
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

    
148
  create_table "sessions", :force => true do |t|
149
    t.string   "session_id", :null => false
150
    t.text     "data"
151
    t.datetime "created_at"
152
    t.datetime "updated_at"
153
  end
154

    
155
  add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
156
  add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
157

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

    
162
  create_table "users", :force => true do |t|
163
    t.string   "login",             :limit => 64,                     :null => false
164
    t.string   "real_name",         :limit => 256
165
    t.string   "email",             :limit => 128
166
    t.string   "hashed_password",   :limit => 512,                    :null => false
167
    t.string   "salt",              :limit => 64,                     :null => false
168
    t.datetime "created_at"
169
    t.datetime "updated_at"
170
    t.boolean  "admin",                            :default => false, :null => false
171
    t.string   "prefered_language", :limit => 16
172
  end
173

    
174
  add_index "users", ["login"], :name => "login", :unique => true
175
  add_index "users", ["real_name"], :name => "real_name", :unique => true
176

    
177
end
    (1-1/1)