OSDN Git Service

add url validator
[pettanr/pettanr.git] / db / schema.rb
1 # encoding: UTF-8\r
2 # This file is auto-generated from the current state of the database. Instead\r
3 # of editing this file, please use the migrations feature of Active Record to\r
4 # incrementally modify your database, and then regenerate this schema definition.\r
5 #\r
6 # Note that this schema.rb definition is the authoritative source for your\r
7 # database schema. If you need to create the application database on another\r
8 # system, you should be using db:schema:load, not running all the migrations\r
9 # from scratch. The latter is a flawed and unsustainable approach (the more migrations\r
10 # you'll amass, the slower it'll run and the greater likelihood for issues).\r
11 #\r
12 # It's strongly recommended to check this file into your version control system.\r
13 \r
14 ActiveRecord::Schema.define(:version => 20120424100555) do\r
15 \r
16   create_table "admins", :force => true do |t|\r
17     t.string   "email",                                 :default => "", :null => false\r
18     t.string   "encrypted_password",     :limit => 128, :default => "", :null => false\r
19     t.string   "reset_password_token"\r
20     t.datetime "reset_password_sent_at"\r
21     t.datetime "remember_created_at"\r
22     t.integer  "sign_in_count",                         :default => 0\r
23     t.datetime "current_sign_in_at"\r
24     t.datetime "last_sign_in_at"\r
25     t.string   "current_sign_in_ip"\r
26     t.string   "last_sign_in_ip"\r
27     t.string   "confirmation_token"\r
28     t.datetime "confirmed_at"\r
29     t.datetime "confirmation_sent_at"\r
30     t.string   "authentication_token"\r
31     t.integer  "approve",                               :default => 0,  :null => false\r
32     t.datetime "created_at"\r
33     t.datetime "updated_at"\r
34   end\r
35 \r
36   add_index "admins", ["authentication_token"], :name => "index_admins_on_authentication_token", :unique => true\r
37   add_index "admins", ["confirmation_token"], :name => "index_admins_on_confirmation_token", :unique => true\r
38   add_index "admins", ["email"], :name => "index_admins_on_email", :unique => true\r
39   add_index "admins", ["reset_password_token"], :name => "index_admins_on_reset_password_token", :unique => true\r
40 \r
41   create_table "artists", :force => true do |t|\r
42     t.string   "email"\r
43     t.string   "name"\r
44     t.string   "homepage_url"\r
45     t.string   "api_url"\r
46     t.integer  "default_license_id", :default => 0, :null => false\r
47     t.datetime "crowled_at"\r
48     t.datetime "created_at"\r
49     t.datetime "updated_at"\r
50     t.integer  "author_id"\r
51   end\r
52 \r
53   create_table "authors", :force => true do |t|\r
54     t.string   "name"\r
55     t.integer  "user_id",    :default => 0, :null => false\r
56     t.datetime "created_at"\r
57     t.datetime "updated_at"\r
58   end\r
59 \r
60   add_index "authors", ["user_id"], :name => "index_authors_on_user_id", :unique => true\r
61 \r
62   create_table "balloons", :force => true do |t|\r
63     t.integer  "speech_balloon_id", :null => false\r
64     t.integer  "system_picture_id", :null => false\r
65     t.integer  "x",                 :null => false\r
66     t.integer  "y",                 :null => false\r
67     t.integer  "width",             :null => false\r
68     t.integer  "height",            :null => false\r
69     t.string   "caption"\r
70     t.string   "settings"\r
71     t.datetime "created_at"\r
72     t.datetime "updated_at"\r
73   end\r
74 \r
75   add_index "balloons", ["speech_balloon_id"], :name => "index_balloons_on_speech_balloon_id"\r
76 \r
77   create_table "comics", :force => true do |t|\r
78     t.string   "title",      :limit => 100,                :null => false\r
79     t.integer  "width",                                    :null => false\r
80     t.integer  "height",                                   :null => false\r
81     t.integer  "visible",                   :default => 0, :null => false\r
82     t.integer  "editable",                  :default => 0, :null => false\r
83     t.integer  "author_id",                                :null => false\r
84     t.datetime "created_at"\r
85     t.datetime "updated_at"\r
86   end\r
87 \r
88   add_index "comics", ["author_id"], :name => "index_comics_on_author_id"\r
89 \r
90   create_table "common_licenses", :force => true do |t|\r
91     t.integer  "license_id",                       :null => false\r
92     t.string   "name",                             :null => false\r
93     t.string   "url",                              :null => false\r
94     t.integer  "cc_by",             :default => 0, :null => false\r
95     t.integer  "cc_sa",             :default => 0, :null => false\r
96     t.integer  "cc_nd",             :default => 0, :null => false\r
97     t.integer  "cc_nc",             :default => 0, :null => false\r
98     t.integer  "no_resize",         :default => 0, :null => false\r
99     t.integer  "no_flip",           :default => 0, :null => false\r
100     t.integer  "no_convert",        :default => 0, :null => false\r
101     t.integer  "keep_aspect_ratio", :default => 0, :null => false\r
102     t.datetime "created_at"\r
103     t.datetime "updated_at"\r
104   end\r
105 \r
106   create_table "licenses", :force => true do |t|\r
107     t.string   "name",                             :null => false\r
108     t.string   "url",                              :null => false\r
109     t.integer  "cc_by",             :default => 0, :null => false\r
110     t.integer  "cc_sa",             :default => 0, :null => false\r
111     t.integer  "cc_nd",             :default => 0, :null => false\r
112     t.integer  "cc_nc",             :default => 0, :null => false\r
113     t.integer  "no_resize",         :default => 0, :null => false\r
114     t.integer  "no_flip",           :default => 0, :null => false\r
115     t.integer  "no_convert",        :default => 0, :null => false\r
116     t.integer  "keep_aspect_ratio", :default => 0, :null => false\r
117     t.datetime "created_at"\r
118     t.datetime "updated_at"\r
119   end\r
120 \r
121   add_index "licenses", ["url"], :name => "index_licenses_on_url", :unique => true\r
122 \r
123   create_table "original_licenses", :force => true do |t|\r
124     t.integer  "license_id",                       :null => false\r
125     t.string   "name",                             :null => false\r
126     t.string   "url",                              :null => false\r
127     t.integer  "cc_by",             :default => 0, :null => false\r
128     t.integer  "cc_sa",             :default => 0, :null => false\r
129     t.integer  "cc_nd",             :default => 0, :null => false\r
130     t.integer  "cc_nc",             :default => 0, :null => false\r
131     t.integer  "no_resize",         :default => 0, :null => false\r
132     t.integer  "no_flip",           :default => 0, :null => false\r
133     t.integer  "no_convert",        :default => 0, :null => false\r
134     t.integer  "keep_aspect_ratio", :default => 0, :null => false\r
135     t.datetime "created_at"\r
136     t.datetime "updated_at"\r
137   end\r
138 \r
139   create_table "original_pictures", :force => true do |t|\r
140     t.string   "ext",                       :null => false\r
141     t.integer  "width",                     :null => false\r
142     t.integer  "height",                    :null => false\r
143     t.integer  "filesize",                  :null => false\r
144     t.integer  "artist_id",  :default => 0, :null => false\r
145     t.integer  "license_id", :default => 0, :null => false\r
146     t.datetime "created_at"\r
147     t.datetime "updated_at"\r
148   end\r
149 \r
150   add_index "original_pictures", ["artist_id"], :name => "index_original_pictures_on_artist_id"\r
151 \r
152   create_table "panel_pictures", :force => true do |t|\r
153     t.integer  "panel_id",                                          :null => false\r
154     t.integer  "resource_picture_id",                               :null => false\r
155     t.string   "link",                :limit => 200\r
156     t.integer  "x",                                                 :null => false\r
157     t.integer  "y",                                                 :null => false\r
158     t.integer  "z",                                                 :null => false\r
159     t.integer  "t",                                  :default => 1, :null => false\r
160     t.integer  "width",                                             :null => false\r
161     t.integer  "height",                                            :null => false\r
162     t.datetime "created_at"\r
163     t.datetime "updated_at"\r
164   end\r
165 \r
166   add_index "panel_pictures", ["panel_id", "t"], :name => "panel_pictures_idt", :unique => true\r
167 \r
168   create_table "panels", :force => true do |t|\r
169     t.integer  "comic_id"\r
170     t.integer  "resource_picture_id"\r
171     t.integer  "width",               :default => 200, :null => false\r
172     t.integer  "height",              :default => 80,  :null => false\r
173     t.integer  "border",              :default => 1,   :null => false\r
174     t.integer  "x"\r
175     t.integer  "y"\r
176     t.integer  "z"\r
177     t.integer  "t",                                    :null => false\r
178     t.integer  "author_id",                            :null => false\r
179     t.datetime "created_at"\r
180     t.datetime "updated_at"\r
181   end\r
182 \r
183   add_index "panels", ["author_id"], :name => "index_panels_on_author_id"\r
184 \r
185   create_table "resource_pictures", :force => true do |t|\r
186     t.string   "ext",                                :null => false\r
187     t.integer  "width",                              :null => false\r
188     t.integer  "height",                             :null => false\r
189     t.integer  "filesize",                           :null => false\r
190     t.integer  "artist_id",           :default => 0, :null => false\r
191     t.integer  "license_id",          :default => 0, :null => false\r
192     t.integer  "original_picture_id",                :null => false\r
193     t.datetime "created_at"\r
194     t.datetime "updated_at"\r
195   end\r
196 \r
197   create_table "speech_balloon_templates", :force => true do |t|\r
198     t.string   "name",       :limit => 50,                :null => false\r
199     t.string   "classname",  :limit => 50,                :null => false\r
200     t.string   "caption",    :limit => 30,                :null => false\r
201     t.integer  "t",                        :default => 0, :null => false\r
202     t.string   "settings",                                :null => false\r
203     t.datetime "created_at"\r
204     t.datetime "updated_at"\r
205   end\r
206 \r
207   add_index "speech_balloon_templates", ["name"], :name => "speech_balloon_templates_name", :unique => true\r
208   add_index "speech_balloon_templates", ["t"], :name => "speech_balloon_templates_t", :unique => true\r
209 \r
210   create_table "speech_balloons", :force => true do |t|\r
211     t.integer  "panel_id",                                 :null => false\r
212     t.integer  "speech_balloon_template_id",               :null => false\r
213     t.string   "classname",                  :limit => 50, :null => false\r
214     t.integer  "z",                                        :null => false\r
215     t.integer  "t",                                        :null => false\r
216     t.string   "settings"\r
217     t.datetime "created_at"\r
218     t.datetime "updated_at"\r
219   end\r
220 \r
221   add_index "speech_balloons", ["panel_id"], :name => "index_speech_balloons_on_panel_id"\r
222 \r
223   create_table "speeches", :force => true do |t|\r
224     t.integer  "speech_balloon_id", :null => false\r
225     t.string   "content"\r
226     t.integer  "x",                 :null => false\r
227     t.integer  "y",                 :null => false\r
228     t.integer  "width",             :null => false\r
229     t.integer  "height",            :null => false\r
230     t.string   "settings"\r
231     t.datetime "created_at"\r
232     t.datetime "updated_at"\r
233   end\r
234 \r
235   add_index "speeches", ["speech_balloon_id"], :name => "index_speeches_on_speech_balloon_id"\r
236 \r
237   create_table "system_pictures", :force => true do |t|\r
238     t.string   "ext",                      :null => false\r
239     t.integer  "width",                    :null => false\r
240     t.integer  "height",                   :null => false\r
241     t.integer  "filesize",                 :null => false\r
242     t.string   "md5",        :limit => 32, :null => false\r
243     t.datetime "created_at"\r
244     t.datetime "updated_at"\r
245   end\r
246 \r
247   create_table "users", :force => true do |t|\r
248     t.string   "email",                                 :default => "", :null => false\r
249     t.string   "encrypted_password",     :limit => 128, :default => "", :null => false\r
250     t.string   "reset_password_token"\r
251     t.datetime "reset_password_sent_at"\r
252     t.datetime "remember_created_at"\r
253     t.integer  "sign_in_count",                         :default => 0\r
254     t.datetime "current_sign_in_at"\r
255     t.datetime "last_sign_in_at"\r
256     t.string   "current_sign_in_ip"\r
257     t.string   "last_sign_in_ip"\r
258     t.string   "authentication_token"\r
259     t.string   "confirmation_token"\r
260     t.datetime "confirmed_at"\r
261     t.datetime "confirmation_sent_at"\r
262     t.datetime "created_at"\r
263     t.datetime "updated_at"\r
264   end\r
265 \r
266   add_index "users", ["authentication_token"], :name => "index_users_on_authentication_token", :unique => true\r
267   add_index "users", ["confirmation_token"], :name => "index_users_on_confirmation_token", :unique => true\r
268   add_index "users", ["email"], :name => "index_users_on_email", :unique => true\r
269   add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true\r
270 \r
271 end\r