commit 3b6475bb5fc839146c63229bdb617309b51ab7e4
Author: Marc Dequènes (Duck) <Duck@DuckCorp.org>
Date:   Sun Jul 11 18:55:21 2010 +0200

    [evol] updated schema

diff --git a/db/schema.rb b/db/schema.rb
index 3eebe24..6dd6bcd 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -13,14 +13,14 @@ ActiveRecord::Schema.define(:version => 20090411170814) do
 
   create_table "artwork_conditions", :force => true do |t|
     t.string  "name",     :limit => 64, :null => false
-    t.integer "position", :limit => 11, :null => false
+    t.integer "position",               :null => false
   end
 
   add_index "artwork_conditions", ["name"], :name => "nom", :unique => true
 
   create_table "artwork_groups", :force => true do |t|
     t.string   "name",           :limit => 128, :null => false
-    t.integer  "artwork_set_id", :limit => 11,  :null => false
+    t.integer  "artwork_set_id", :limit => 8,   :null => false
     t.datetime "created_at"
     t.datetime "updated_at"
     t.text     "comment"
@@ -37,8 +37,8 @@ ActiveRecord::Schema.define(:version => 20090411170814) do
   add_index "artwork_materials", ["name"], :name => "nom_2"
 
   create_table "artwork_materials_artworks", :id => false, :force => true do |t|
-    t.integer "artwork_id",          :limit => 10, :null => false
-    t.integer "artwork_material_id", :limit => 10, :null => false
+    t.integer "artwork_id",          :limit => 8, :null => false
+    t.integer "artwork_material_id",              :null => false
   end
 
   add_index "artwork_materials_artworks", ["artwork_material_id", "artwork_id"], :name => "artwork_material_id", :unique => true
@@ -60,9 +60,9 @@ ActiveRecord::Schema.define(:version => 20090411170814) do
   add_index "artwork_sets", ["name"], :name => "nom_2"
 
   create_table "artwork_sizes", :force => true do |t|
-    t.integer "height",   :limit => 10,                    :null => false
-    t.integer "width",    :limit => 10,                    :null => false
-    t.boolean "standard",               :default => false, :null => false
+    t.integer "height",                      :null => false
+    t.integer "width",                       :null => false
+    t.boolean "standard", :default => false, :null => false
   end
 
   add_index "artwork_sizes", ["height", "width"], :name => "proportion", :unique => true
@@ -70,14 +70,15 @@ ActiveRecord::Schema.define(:version => 20090411170814) do
   create_table "artwork_steps", :force => true do |t|
     t.string   "filename",     :limit => 512, :null => false
     t.date     "date"
-    t.integer  "artwork_id",   :limit => 20
+    t.integer  "position",     :limit => 1,   :null => false
+    t.integer  "artwork_id",   :limit => 8
     t.datetime "created_at"
     t.datetime "updated_at"
-    t.integer  "size",         :limit => 20,  :null => false
+    t.integer  "size",         :limit => 8,   :null => false
     t.string   "content_type", :limit => 64,  :null => false
-    t.integer  "height",       :limit => 11,  :null => false
-    t.integer  "width",        :limit => 11,  :null => false
-    t.integer  "parent_id",    :limit => 20
+    t.integer  "height",                      :null => false
+    t.integer  "width",                       :null => false
+    t.integer  "parent_id",    :limit => 8
     t.string   "thumbnail",    :limit => 64
     t.string   "type",         :limit => 64,  :null => false
     t.string   "comment",      :limit => 512
@@ -94,21 +95,21 @@ ActiveRecord::Schema.define(:version => 20090411170814) do
   add_index "artwork_supports", ["name"], :name => "nom_2"
 
   create_table "artwork_supports_artworks", :id => false, :force => true do |t|
-    t.integer "artwork_support_id", :limit => 10, :null => false
-    t.integer "artwork_id",         :limit => 20, :null => false
+    t.integer "artwork_support_id",              :null => false
+    t.integer "artwork_id",         :limit => 8, :null => false
   end
 
   add_index "artwork_supports_artworks", ["artwork_support_id", "artwork_id"], :name => "artwork_support_id", :unique => true
 
   create_table "artworks", :force => true do |t|
-    t.integer  "artwork_set_id",              :limit => 20
+    t.integer  "artwork_set_id",              :limit => 8
     t.string   "artwork_set_position",        :limit => 32
-    t.integer  "artwork_group_id",            :limit => 20
+    t.integer  "artwork_group_id",            :limit => 8
     t.string   "artwork_group_position",      :limit => 32
     t.string   "title",                       :limit => 256, :null => false
-    t.integer  "artwork_size_id",             :limit => 10,  :null => false
-    t.integer  "artwork_condition_id",        :limit => 10,  :null => false
-    t.integer  "artwork_placement_reason_id", :limit => 10
+    t.integer  "artwork_size_id",                            :null => false
+    t.integer  "artwork_condition_id",                       :null => false
+    t.integer  "artwork_placement_reason_id"
     t.string   "placement_location",          :limit => 256
     t.date     "placement_date"
     t.text     "comment"
@@ -116,13 +117,12 @@ ActiveRecord::Schema.define(:version => 20090411170814) do
     t.datetime "updated_at"
   end
 
-  create_table "exhibition_artwork", :force => true do |t|
-    t.integer "exhibition_id", :limit => 20, :null => false
-    t.integer "artwork_id",    :limit => 20, :null => false
-    t.integer "position",      :limit => 20, :null => false
+  create_table "artworks_tags", :id => false, :force => true do |t|
+    t.integer "tag_id",                  :null => false
+    t.integer "artwork_id", :limit => 8, :null => false
   end
 
-  add_index "exhibition_artwork", ["exhibition_id", "artwork_id"], :name => "exhibition_id", :unique => true
+  add_index "artworks_tags", ["tag_id", "artwork_id"], :name => "tag_id", :unique => true
 
   create_table "exhibitions", :force => true do |t|
     t.string   "name",       :limit => 128,                    :null => false
@@ -137,6 +137,14 @@ ActiveRecord::Schema.define(:version => 20090411170814) do
   add_index "exhibitions", ["name"], :name => "nom", :unique => true
   add_index "exhibitions", ["name"], :name => "nom_2"
 
+  create_table "exhibitions_artworks", :id => false, :force => true do |t|
+    t.integer "exhibition_id", :limit => 8, :null => false
+    t.integer "artwork_id",    :limit => 8, :null => false
+    t.integer "position",      :limit => 8, :null => false
+  end
+
+  add_index "exhibitions_artworks", ["exhibition_id", "artwork_id"], :name => "exhibition_id", :unique => true
+
   create_table "sessions", :force => true do |t|
     t.string   "session_id", :null => false
     t.text     "data"
@@ -147,6 +155,10 @@ ActiveRecord::Schema.define(:version => 20090411170814) do
   add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
   add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
 
+  create_table "tags", :force => true do |t|
+    t.string "name", :limit => 32, :null => false
+  end
+
   create_table "users", :force => true do |t|
     t.string   "login",             :limit => 64,                     :null => false
     t.string   "real_name",         :limit => 256
