OSDN Git Service

comic test ok
[pettanr/pettanr.git] / db / schema.rb
index 818bfaf..6d51ff2 100644 (file)
@@ -11,7 +11,7 @@
 #\r
 # It's strongly recommended to check this file into your version control system.\r
 \r
-ActiveRecord::Schema.define(:version => 20120102071851) do\r
+ActiveRecord::Schema.define(:version => 20120306231650) do\r
 \r
   create_table "admins", :force => true do |t|\r
     t.string   "email",                                 :default => "", :null => false\r
@@ -28,6 +28,7 @@ ActiveRecord::Schema.define(:version => 20120102071851) do
     t.datetime "confirmed_at"\r
     t.datetime "confirmation_sent_at"\r
     t.string   "authentication_token"\r
+    t.integer  "approve",                               :default => 0,  :null => false\r
     t.datetime "created_at"\r
     t.datetime "updated_at"\r
   end\r
@@ -42,7 +43,7 @@ ActiveRecord::Schema.define(:version => 20120102071851) do
     t.string   "name"\r
     t.string   "homepage_url"\r
     t.string   "api_url"\r
-    t.integer  "default_lisence_id"\r
+    t.integer  "default_license_id", :default => 0, :null => false\r
     t.datetime "crowled_at"\r
     t.datetime "created_at"\r
     t.datetime "updated_at"\r
@@ -51,28 +52,12 @@ ActiveRecord::Schema.define(:version => 20120102071851) do
 \r
   create_table "authors", :force => true do |t|\r
     t.string   "name"\r
-    t.string   "email",                                 :default => "", :null => false\r
-    t.string   "encrypted_password",     :limit => 128, :default => "", :null => false\r
-    t.string   "reset_password_token"\r
-    t.datetime "reset_password_sent_at"\r
-    t.datetime "remember_created_at"\r
-    t.integer  "sign_in_count",                         :default => 0\r
-    t.datetime "current_sign_in_at"\r
-    t.datetime "last_sign_in_at"\r
-    t.string   "current_sign_in_ip"\r
-    t.string   "last_sign_in_ip"\r
-    t.string   "authentication_token"\r
-    t.string   "confirmation_token"\r
-    t.datetime "confirmed_at"\r
-    t.datetime "confirmation_sent_at"\r
+    t.integer  "user_id",    :default => 0, :null => false\r
     t.datetime "created_at"\r
     t.datetime "updated_at"\r
   end\r
 \r
-  add_index "authors", ["authentication_token"], :name => "index_authors_on_authentication_token", :unique => true\r
-  add_index "authors", ["confirmation_token"], :name => "index_authors_on_confirmation_token", :unique => true\r
-  add_index "authors", ["email"], :name => "index_authors_on_email", :unique => true\r
-  add_index "authors", ["reset_password_token"], :name => "index_authors_on_reset_password_token", :unique => true\r
+  add_index "authors", ["user_id"], :name => "index_authors_on_user_id", :unique => true\r
 \r
   create_table "balloon_templates", :force => true do |t|\r
     t.integer  "speach_balloon_id",                :null => false\r
@@ -110,20 +95,20 @@ ActiveRecord::Schema.define(:version => 20120102071851) do
   add_index "balloons", ["panel_id"], :name => "index_balloons_on_panel_id"\r
 \r
   create_table "comics", :force => true do |t|\r
-    t.string   "title"\r
-    t.integer  "width",      :default => 200, :null => false\r
-    t.integer  "height",     :default => 80,  :null => false\r
-    t.integer  "visible",    :default => 0,   :null => false\r
-    t.integer  "editable",   :default => 0,   :null => false\r
-    t.integer  "author_id"\r
+    t.string   "title",      :limit => 100,                :null => false\r
+    t.integer  "width",                                    :null => false\r
+    t.integer  "height",                                   :null => false\r
+    t.integer  "visible",                   :default => 0, :null => false\r
+    t.integer  "editable",                  :default => 0, :null => false\r
+    t.integer  "author_id",                                :null => false\r
     t.datetime "created_at"\r
     t.datetime "updated_at"\r
   end\r
 \r
   add_index "comics", ["author_id"], :name => "index_comics_on_author_id"\r
 \r
-  create_table "common_lisences", :force => true do |t|\r
-    t.integer  "lisence_id",                       :null => false\r
+  create_table "common_licenses", :force => true do |t|\r
+    t.integer  "license_id",                       :null => false\r
     t.string   "name",                             :null => false\r
     t.string   "url",                              :null => false\r
     t.integer  "cc_by",             :default => 0, :null => false\r
@@ -138,7 +123,7 @@ ActiveRecord::Schema.define(:version => 20120102071851) do
     t.datetime "updated_at"\r
   end\r
 \r
-  create_table "lisences", :force => true do |t|\r
+  create_table "licenses", :force => true do |t|\r
     t.string   "name",                             :null => false\r
     t.string   "url",                              :null => false\r
     t.integer  "cc_by",             :default => 0, :null => false\r
@@ -153,11 +138,11 @@ ActiveRecord::Schema.define(:version => 20120102071851) do
     t.datetime "updated_at"\r
   end\r
 \r
-  add_index "lisences", ["url"], :name => "index_lisences_on_url", :unique => true\r
+  add_index "licenses", ["url"], :name => "index_licenses_on_url", :unique => true\r
 \r
-  create_table "original_lisences", :force => true do |t|\r
+  create_table "original_licenses", :force => true do |t|\r
     t.integer  "artist_id",                        :null => false\r
-    t.integer  "lisence_id",                       :null => false\r
+    t.integer  "license_id",                       :null => false\r
     t.string   "name",                             :null => false\r
     t.string   "url",                              :null => false\r
     t.integer  "cc_by",             :default => 0, :null => false\r
@@ -173,12 +158,12 @@ ActiveRecord::Schema.define(:version => 20120102071851) do
   end\r
 \r
   create_table "original_pictures", :force => true do |t|\r
-    t.string   "ext",        :null => false\r
-    t.integer  "width",      :null => false\r
-    t.integer  "height",     :null => false\r
-    t.integer  "filesize",   :null => false\r
-    t.integer  "artist_id"\r
-    t.integer  "lisence_id"\r
+    t.string   "ext",                       :null => false\r
+    t.integer  "width",                     :null => false\r
+    t.integer  "height",                    :null => false\r
+    t.integer  "filesize",                  :null => false\r
+    t.integer  "artist_id",  :default => 0, :null => false\r
+    t.integer  "license_id", :default => 0, :null => false\r
     t.datetime "created_at"\r
     t.datetime "updated_at"\r
   end\r
@@ -188,15 +173,13 @@ ActiveRecord::Schema.define(:version => 20120102071851) do
   create_table "panel_pictures", :force => true do |t|\r
     t.integer  "panel_id",                                          :null => false\r
     t.integer  "resource_picture_id",                               :null => false\r
-    t.string   "url",                 :limit => 200\r
+    t.string   "link",                :limit => 200\r
     t.integer  "x",                                                 :null => false\r
     t.integer  "y",                                                 :null => false\r
     t.integer  "z",                                                 :null => false\r
     t.integer  "t",                                  :default => 1, :null => false\r
     t.integer  "width",                                             :null => false\r
     t.integer  "height",                                            :null => false\r
-    t.integer  "flipv",                              :default => 0, :null => false\r
-    t.integer  "fliph",                              :default => 0, :null => false\r
     t.datetime "created_at"\r
     t.datetime "updated_at"\r
   end\r
@@ -222,13 +205,13 @@ ActiveRecord::Schema.define(:version => 20120102071851) do
   add_index "panels", ["comic_id", "t"], :name => "panels_idt", :unique => true\r
 \r
   create_table "resource_pictures", :force => true do |t|\r
-    t.string   "ext",                 :null => false\r
-    t.integer  "width",               :null => false\r
-    t.integer  "height",              :null => false\r
-    t.integer  "filesize",            :null => false\r
-    t.integer  "artist_id"\r
-    t.integer  "lisence_id"\r
-    t.integer  "original_picture_id", :null => false\r
+    t.string   "ext",                                :null => false\r
+    t.integer  "width",                              :null => false\r
+    t.integer  "height",                             :null => false\r
+    t.integer  "filesize",                           :null => false\r
+    t.integer  "artist_id",           :default => 0, :null => false\r
+    t.integer  "license_id",          :default => 0, :null => false\r
+    t.integer  "original_picture_id",                :null => false\r
     t.datetime "created_at"\r
     t.datetime "updated_at"\r
   end\r
@@ -258,13 +241,14 @@ ActiveRecord::Schema.define(:version => 20120102071851) do
   add_index "speach_templates", ["balloon_template_id", "t"], :name => "speach_templates_idt", :unique => true\r
 \r
   create_table "speaches", :force => true do |t|\r
-    t.integer  "balloon_id",                :null => false\r
+    t.integer  "balloon_id",                        :null => false\r
+    t.integer  "speach_template_id",                :null => false\r
     t.string   "content"\r
-    t.integer  "x",                         :null => false\r
-    t.integer  "y",                         :null => false\r
-    t.integer  "t",          :default => 1, :null => false\r
-    t.integer  "width",                     :null => false\r
-    t.integer  "height",                    :null => false\r
+    t.integer  "x",                                 :null => false\r
+    t.integer  "y",                                 :null => false\r
+    t.integer  "t",                  :default => 1, :null => false\r
+    t.integer  "width",                             :null => false\r
+    t.integer  "height",                            :null => false\r
     t.datetime "created_at"\r
     t.datetime "updated_at"\r
   end\r
@@ -281,4 +265,28 @@ ActiveRecord::Schema.define(:version => 20120102071851) do
     t.datetime "updated_at"\r
   end\r
 \r
+  create_table "users", :force => true do |t|\r
+    t.string   "email",                                 :default => "", :null => false\r
+    t.string   "encrypted_password",     :limit => 128, :default => "", :null => false\r
+    t.string   "reset_password_token"\r
+    t.datetime "reset_password_sent_at"\r
+    t.datetime "remember_created_at"\r
+    t.integer  "sign_in_count",                         :default => 0\r
+    t.datetime "current_sign_in_at"\r
+    t.datetime "last_sign_in_at"\r
+    t.string   "current_sign_in_ip"\r
+    t.string   "last_sign_in_ip"\r
+    t.string   "authentication_token"\r
+    t.string   "confirmation_token"\r
+    t.datetime "confirmed_at"\r
+    t.datetime "confirmation_sent_at"\r
+    t.datetime "created_at"\r
+    t.datetime "updated_at"\r
+  end\r
+\r
+  add_index "users", ["authentication_token"], :name => "index_users_on_authentication_token", :unique => true\r
+  add_index "users", ["confirmation_token"], :name => "index_users_on_confirmation_token", :unique => true\r
+  add_index "users", ["email"], :name => "index_users_on_email", :unique => true\r
+  add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true\r
+\r
 end\r