Project

General

Profile

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

root / db / schema.rb @ 70e65017

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_placement_reasons", :force => true do |t|
40
    t.string "name", :limit => 64, :null => false
41
  end
42

    
43
  add_index "artwork_placement_reasons", ["name"], :name => "nom", :unique => true
44

    
45
  create_table "artwork_sets", :force => true do |t|
46
    t.string   "name",       :limit => 128, :null => false
47
    t.datetime "created_at"
48
    t.datetime "updated_at"
49
    t.text     "comment"
50
  end
51

    
52
  add_index "artwork_sets", ["name"], :name => "nom", :unique => true
53
  add_index "artwork_sets", ["name"], :name => "nom_2"
54

    
55
  create_table "artwork_sizes", :force => true do |t|
56
    t.float   "height",                      :null => false
57
    t.float   "width",                       :null => false
58
    t.boolean "standard", :default => false, :null => false
59
  end
60

    
61
  add_index "artwork_sizes", ["height", "width"], :name => "proportion", :unique => true
62

    
63
  create_table "artwork_steps", :force => true do |t|
64
    t.string   "filename",     :limit => 512, :null => false
65
    t.date     "date"
66
    t.integer  "artwork_id",   :limit => 20
67
    t.datetime "created_at"
68
    t.datetime "updated_at"
69
    t.integer  "size",         :limit => 20,  :null => false
70
    t.string   "content_type", :limit => 64,  :null => false
71
    t.integer  "height",       :limit => 11,  :null => false
72
    t.integer  "width",        :limit => 11,  :null => false
73
    t.integer  "parent_id",    :limit => 20
74
    t.string   "thumbnail",    :limit => 64
75
    t.string   "type",         :limit => 64,  :null => false
76
    t.string   "comment",      :limit => 512
77
  end
78

    
79
  add_index "artwork_steps", ["filename"], :name => "image_filename", :unique => true
80

    
81
  create_table "artwork_supports", :force => true do |t|
82
    t.string "name",    :limit => 128, :null => false
83
    t.string "acronym", :limit => 8
84
  end
85

    
86
  add_index "artwork_supports", ["name", "acronym"], :name => "nom", :unique => true
87
  add_index "artwork_supports", ["name"], :name => "nom_2"
88

    
89
  create_table "artwork_supports_artworks", :force => true do |t|
90
    t.integer "artwork_support_id", :limit => 10, :null => false
91
    t.integer "artwork_id",         :limit => 20, :null => false
92
  end
93

    
94
  add_index "artwork_supports_artworks", ["artwork_support_id", "artwork_id"], :name => "artwork_support_id", :unique => true
95

    
96
  create_table "artworks", :force => true do |t|
97
    t.integer  "artwork_set_id",              :limit => 20
98
    t.string   "artwork_set_position",        :limit => 32
99
    t.integer  "artwork_group_id",            :limit => 20
100
    t.string   "artwork_group_position",      :limit => 32
101
    t.string   "title",                       :limit => 256, :null => false
102
    t.integer  "artwork_material_id",         :limit => 10,  :null => false
103
    t.integer  "artwork_size_id",             :limit => 10,  :null => false
104
    t.integer  "artwork_condition_id",        :limit => 10,  :null => false
105
    t.integer  "artwork_placement_reason_id", :limit => 10
106
    t.string   "placement_location",          :limit => 256
107
    t.date     "placement_date"
108
    t.text     "comment"
109
    t.datetime "created_at"
110
    t.datetime "updated_at"
111
  end
112

    
113
  create_table "exhibition_artwork", :force => true do |t|
114
    t.integer "exhibition_id", :limit => 20, :null => false
115
    t.integer "artwork_id",    :limit => 20, :null => false
116
    t.integer "position",      :limit => 20, :null => false
117
  end
118

    
119
  add_index "exhibition_artwork", ["exhibition_id", "artwork_id"], :name => "exhibition_id", :unique => true
120

    
121
  create_table "exhibitions", :force => true do |t|
122
    t.string   "name",       :limit => 128,                    :null => false
123
    t.date     "start",                                        :null => false
124
    t.date     "end",                                          :null => false
125
    t.string   "place",      :limit => 128,                    :null => false
126
    t.boolean  "hidden",                    :default => false, :null => false
127
    t.datetime "created_at"
128
    t.datetime "updated_at"
129
  end
130

    
131
  add_index "exhibitions", ["name"], :name => "nom", :unique => true
132
  add_index "exhibitions", ["name"], :name => "nom_2"
133

    
134
  create_table "users", :force => true do |t|
135
    t.string   "login",           :limit => 64,                     :null => false
136
    t.string   "real_name",       :limit => 256
137
    t.string   "email",           :limit => 128
138
    t.string   "hashed_password", :limit => 512,                    :null => false
139
    t.string   "salt",            :limit => 64,                     :null => false
140
    t.datetime "created_at"
141
    t.datetime "updated_at"
142
    t.boolean  "admin",                          :default => false, :null => false
143
  end
144

    
145
  add_index "users", ["login"], :name => "login", :unique => true
146
  add_index "users", ["real_name"], :name => "real_name", :unique => true
147

    
148
end
    (1-1/1)