Project

General

Profile

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

root / db / schema.rb @ aaa55822

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 => 0) do
13

    
14
  create_table "artwork_conditions", :force => true do |t|
15
    t.string  "name",     :limit => 64, :null => false
16
    t.integer "position", :limit => 11, :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 => 11,  :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 => 10, :null => false
41
    t.integer "artwork_material_id", :limit => 10, :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.float   "height",                      :null => false
64
    t.float   "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  "artwork_id",   :limit => 20
74
    t.datetime "created_at"
75
    t.datetime "updated_at"
76
    t.integer  "size",         :limit => 20,  :null => false
77
    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
81
    t.string   "thumbnail",    :limit => 64
82
    t.string   "type",         :limit => 64,  :null => false
83
    t.string   "comment",      :limit => 512
84
  end
85

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

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

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

    
96
  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
99
  end
100

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

    
103
  create_table "artworks", :force => true do |t|
104
    t.integer  "artwork_set_id",              :limit => 20
105
    t.string   "artwork_set_position",        :limit => 32
106
    t.integer  "artwork_group_id",            :limit => 20
107
    t.string   "artwork_group_position",      :limit => 32
108
    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
112
    t.string   "placement_location",          :limit => 256
113
    t.date     "placement_date"
114
    t.text     "comment"
115
    t.datetime "created_at"
116
    t.datetime "updated_at"
117
  end
118

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

    
125
  add_index "exhibition_artwork", ["exhibition_id", "artwork_id"], :name => "exhibition_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 "users", :force => true do |t|
141
    t.string   "login",           :limit => 64,                     :null => false
142
    t.string   "real_name",       :limit => 256
143
    t.string   "email",           :limit => 128
144
    t.string   "hashed_password", :limit => 512,                    :null => false
145
    t.string   "salt",            :limit => 64,                     :null => false
146
    t.datetime "created_at"
147
    t.datetime "updated_at"
148
    t.boolean  "admin",                          :default => false, :null => false
149
  end
150

    
151
  add_index "users", ["login"], :name => "login", :unique => true
152
  add_index "users", ["real_name"], :name => "real_name", :unique => true
153

    
154
end
    (1-1/1)