OSDN Git Service

454f5d34963042d4d6037255a09848a535a7fdd0
[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 => 20120102071851) 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"\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.string   "email",                                 :default => "", :null => false\r
56     t.string   "encrypted_password",     :limit => 128, :default => "", :null => false\r
57     t.string   "reset_password_token"\r
58     t.datetime "reset_password_sent_at"\r
59     t.datetime "remember_created_at"\r
60     t.integer  "sign_in_count",                         :default => 0\r
61     t.datetime "current_sign_in_at"\r
62     t.datetime "last_sign_in_at"\r
63     t.string   "current_sign_in_ip"\r
64     t.string   "last_sign_in_ip"\r
65     t.string   "authentication_token"\r
66     t.string   "confirmation_token"\r
67     t.datetime "confirmed_at"\r
68     t.datetime "confirmation_sent_at"\r
69     t.datetime "created_at"\r
70     t.datetime "updated_at"\r
71   end\r
72 \r
73   add_index "authors", ["authentication_token"], :name => "index_authors_on_authentication_token", :unique => true\r
74   add_index "authors", ["confirmation_token"], :name => "index_authors_on_confirmation_token", :unique => true\r
75   add_index "authors", ["email"], :name => "index_authors_on_email", :unique => true\r
76   add_index "authors", ["reset_password_token"], :name => "index_authors_on_reset_password_token", :unique => true\r
77 \r
78   create_table "balloon_templates", :force => true do |t|\r
79     t.integer  "speach_balloon_id",                :null => false\r
80     t.integer  "system_picture_id",                :null => false\r
81     t.integer  "tail",              :default => 1, :null => false\r
82     t.integer  "size",              :default => 1, :null => false\r
83     t.integer  "min_width",         :default => 0, :null => false\r
84     t.integer  "max_width",         :default => 0, :null => false\r
85     t.integer  "min_height",        :default => 0, :null => false\r
86     t.integer  "max_height",        :default => 0, :null => false\r
87     t.datetime "created_at"\r
88     t.datetime "updated_at"\r
89   end\r
90 \r
91   add_index "balloon_templates", ["speach_balloon_id", "tail", "size"], :name => "balloon_templates_idts", :unique => true\r
92   add_index "balloon_templates", ["speach_balloon_id"], :name => "index_balloon_templates_on_speach_balloon_id"\r
93 \r
94   create_table "balloons", :force => true do |t|\r
95     t.integer  "panel_id",                           :null => false\r
96     t.integer  "balloon_template_id",                :null => false\r
97     t.integer  "system_picture_id",                  :null => false\r
98     t.integer  "tail",                :default => 1, :null => false\r
99     t.integer  "size",                :default => 1, :null => false\r
100     t.integer  "x",                                  :null => false\r
101     t.integer  "y",                                  :null => false\r
102     t.integer  "z",                                  :null => false\r
103     t.integer  "t",                   :default => 1, :null => false\r
104     t.integer  "width",                              :null => false\r
105     t.integer  "height",                             :null => false\r
106     t.datetime "created_at"\r
107     t.datetime "updated_at"\r
108   end\r
109 \r
110   add_index "balloons", ["panel_id", "t"], :name => "balloon_idt", :unique => true\r
111   add_index "balloons", ["panel_id"], :name => "index_balloons_on_panel_id"\r
112 \r
113   create_table "comics", :force => true do |t|\r
114     t.string   "title"\r
115     t.integer  "width",      :default => 200, :null => false\r
116     t.integer  "height",     :default => 80,  :null => false\r
117     t.integer  "visible",    :default => 0,   :null => false\r
118     t.integer  "editable",   :default => 0,   :null => false\r
119     t.integer  "author_id"\r
120     t.datetime "created_at"\r
121     t.datetime "updated_at"\r
122   end\r
123 \r
124   add_index "comics", ["author_id"], :name => "index_comics_on_author_id"\r
125 \r
126   create_table "common_licenses", :force => true do |t|\r
127     t.integer  "license_id",                       :null => false\r
128     t.string   "name",                             :null => false\r
129     t.string   "url",                              :null => false\r
130     t.integer  "cc_by",             :default => 0, :null => false\r
131     t.integer  "cc_sa",             :default => 0, :null => false\r
132     t.integer  "cc_nd",             :default => 0, :null => false\r
133     t.integer  "cc_nc",             :default => 0, :null => false\r
134     t.integer  "no_resize",         :default => 0, :null => false\r
135     t.integer  "no_flip",           :default => 0, :null => false\r
136     t.integer  "no_convert",        :default => 0, :null => false\r
137     t.integer  "keep_aspect_ratio", :default => 0, :null => false\r
138     t.datetime "created_at"\r
139     t.datetime "updated_at"\r
140   end\r
141 \r
142   create_table "licenses", :force => true do |t|\r
143     t.string   "name",                             :null => false\r
144     t.string   "url",                              :null => false\r
145     t.integer  "cc_by",             :default => 0, :null => false\r
146     t.integer  "cc_sa",             :default => 0, :null => false\r
147     t.integer  "cc_nd",             :default => 0, :null => false\r
148     t.integer  "cc_nc",             :default => 0, :null => false\r
149     t.integer  "no_resize",         :default => 0, :null => false\r
150     t.integer  "no_flip",           :default => 0, :null => false\r
151     t.integer  "no_convert",        :default => 0, :null => false\r
152     t.integer  "keep_aspect_ratio", :default => 0, :null => false\r
153     t.datetime "created_at"\r
154     t.datetime "updated_at"\r
155   end\r
156 \r
157   add_index "licenses", ["url"], :name => "index_licenses_on_url", :unique => true\r
158 \r
159   create_table "original_licenses", :force => true do |t|\r
160     t.integer  "artist_id",                        :null => false\r
161     t.integer  "license_id",                       :null => false\r
162     t.string   "name",                             :null => false\r
163     t.string   "url",                              :null => false\r
164     t.integer  "cc_by",             :default => 0, :null => false\r
165     t.integer  "cc_sa",             :default => 0, :null => false\r
166     t.integer  "cc_nd",             :default => 0, :null => false\r
167     t.integer  "cc_nc",             :default => 0, :null => false\r
168     t.integer  "no_resize",         :default => 0, :null => false\r
169     t.integer  "no_flip",           :default => 0, :null => false\r
170     t.integer  "no_convert",        :default => 0, :null => false\r
171     t.integer  "keep_aspect_ratio", :default => 0, :null => false\r
172     t.datetime "created_at"\r
173     t.datetime "updated_at"\r
174   end\r
175 \r
176   create_table "original_pictures", :force => true do |t|\r
177     t.string   "ext",        :null => false\r
178     t.integer  "width",      :null => false\r
179     t.integer  "height",     :null => false\r
180     t.integer  "filesize",   :null => false\r
181     t.integer  "artist_id"\r
182     t.integer  "license_id"\r
183     t.datetime "created_at"\r
184     t.datetime "updated_at"\r
185   end\r
186 \r
187   add_index "original_pictures", ["artist_id"], :name => "index_original_pictures_on_artist_id"\r
188 \r
189   create_table "panel_pictures", :force => true do |t|\r
190     t.integer  "panel_id",                                          :null => false\r
191     t.integer  "resource_picture_id",                               :null => false\r
192     t.string   "link",                :limit => 200\r
193     t.integer  "x",                                                 :null => false\r
194     t.integer  "y",                                                 :null => false\r
195     t.integer  "z",                                                 :null => false\r
196     t.integer  "t",                                  :default => 1, :null => false\r
197     t.integer  "width",                                             :null => false\r
198     t.integer  "height",                                            :null => false\r
199     t.integer  "flipv",                              :default => 0, :null => false\r
200     t.integer  "fliph",                              :default => 0, :null => false\r
201     t.datetime "created_at"\r
202     t.datetime "updated_at"\r
203   end\r
204 \r
205   add_index "panel_pictures", ["panel_id", "t"], :name => "panel_pictures_idt", :unique => true\r
206 \r
207   create_table "panels", :force => true do |t|\r
208     t.integer  "comic_id",                             :null => false\r
209     t.integer  "resource_picture_id"\r
210     t.integer  "width",               :default => 200, :null => false\r
211     t.integer  "height",              :default => 80,  :null => false\r
212     t.integer  "border",              :default => 1,   :null => false\r
213     t.integer  "x",                                    :null => false\r
214     t.integer  "y",                                    :null => false\r
215     t.integer  "z",                                    :null => false\r
216     t.integer  "t",                   :default => 1,   :null => false\r
217     t.integer  "author_id"\r
218     t.datetime "created_at"\r
219     t.datetime "updated_at"\r
220   end\r
221 \r
222   add_index "panels", ["author_id"], :name => "index_panels_on_author_id"\r
223   add_index "panels", ["comic_id", "t"], :name => "panels_idt", :unique => true\r
224 \r
225   create_table "resource_pictures", :force => true do |t|\r
226     t.string   "ext",                 :null => false\r
227     t.integer  "width",               :null => false\r
228     t.integer  "height",              :null => false\r
229     t.integer  "filesize",            :null => false\r
230     t.integer  "artist_id"\r
231     t.integer  "license_id"\r
232     t.integer  "original_picture_id", :null => false\r
233     t.datetime "created_at"\r
234     t.datetime "updated_at"\r
235   end\r
236 \r
237   create_table "speach_balloons", :force => true do |t|\r
238     t.string   "name",                      :null => false\r
239     t.integer  "tail_count", :default => 1, :null => false\r
240     t.integer  "size_count", :default => 1, :null => false\r
241     t.integer  "t",          :default => 1, :null => false\r
242     t.datetime "created_at"\r
243     t.datetime "updated_at"\r
244   end\r
245 \r
246   add_index "speach_balloons", ["t"], :name => "speach_balloons_t", :unique => true\r
247 \r
248   create_table "speach_templates", :force => true do |t|\r
249     t.integer  "balloon_template_id",                :null => false\r
250     t.integer  "x",                                  :null => false\r
251     t.integer  "y",                                  :null => false\r
252     t.integer  "t",                   :default => 1, :null => false\r
253     t.integer  "width",                              :null => false\r
254     t.integer  "height",                             :null => false\r
255     t.datetime "created_at"\r
256     t.datetime "updated_at"\r
257   end\r
258 \r
259   add_index "speach_templates", ["balloon_template_id", "t"], :name => "speach_templates_idt", :unique => true\r
260 \r
261   create_table "speaches", :force => true do |t|\r
262     t.integer  "balloon_id",                :null => false\r
263     t.string   "content"\r
264     t.integer  "x",                         :null => false\r
265     t.integer  "y",                         :null => false\r
266     t.integer  "t",          :default => 1, :null => false\r
267     t.integer  "width",                     :null => false\r
268     t.integer  "height",                    :null => false\r
269     t.datetime "created_at"\r
270     t.datetime "updated_at"\r
271   end\r
272 \r
273   add_index "speaches", ["balloon_id", "t"], :name => "speaches_bt", :unique => true\r
274   add_index "speaches", ["balloon_id"], :name => "index_speaches_on_balloon_id"\r
275 \r
276   create_table "system_pictures", :force => true do |t|\r
277     t.string   "ext",        :null => false\r
278     t.integer  "width",      :null => false\r
279     t.integer  "height",     :null => false\r
280     t.integer  "filesize",   :null => false\r
281     t.datetime "created_at"\r
282     t.datetime "updated_at"\r
283   end\r
284 \r
285 end\r