OSDN Git Service

0389aba0d73c19d9946503088e34327ebba6117a
[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.integer  "activate",                              :default => 0,  :null => false\r
28     t.datetime "created_at"\r
29     t.datetime "updated_at"\r
30   end\r
31 \r
32   add_index "admins", ["email"], :name => "index_admins_on_email", :unique => true\r
33   add_index "admins", ["reset_password_token"], :name => "index_admins_on_reset_password_token", :unique => true\r
34 \r
35   create_table "artists", :force => true do |t|\r
36     t.string   "email"\r
37     t.string   "name"\r
38     t.string   "homepage_url"\r
39     t.string   "api_url"\r
40     t.integer  "default_lisence_id"\r
41     t.datetime "crowled_at"\r
42     t.datetime "created_at"\r
43     t.datetime "updated_at"\r
44     t.integer  "author_id"\r
45   end\r
46 \r
47   create_table "authors", :force => true do |t|\r
48     t.string   "name"\r
49     t.string   "email",                                 :default => "", :null => false\r
50     t.string   "encrypted_password",     :limit => 128, :default => "", :null => false\r
51     t.string   "reset_password_token"\r
52     t.datetime "reset_password_sent_at"\r
53     t.datetime "remember_created_at"\r
54     t.integer  "sign_in_count",                         :default => 0\r
55     t.datetime "current_sign_in_at"\r
56     t.datetime "last_sign_in_at"\r
57     t.string   "current_sign_in_ip"\r
58     t.string   "last_sign_in_ip"\r
59     t.string   "authentication_token"\r
60     t.string   "confirmation_token"\r
61     t.datetime "confirmed_at"\r
62     t.datetime "confirmation_sent_at"\r
63     t.datetime "created_at"\r
64     t.datetime "updated_at"\r
65   end\r
66 \r
67   add_index "authors", ["authentication_token"], :name => "index_authors_on_authentication_token", :unique => true\r
68   add_index "authors", ["confirmation_token"], :name => "index_authors_on_confirmation_token", :unique => true\r
69   add_index "authors", ["email"], :name => "index_authors_on_email", :unique => true\r
70   add_index "authors", ["reset_password_token"], :name => "index_authors_on_reset_password_token", :unique => true\r
71 \r
72   create_table "balloon_templates", :force => true do |t|\r
73     t.integer  "speach_balloon_id",                  :null => false\r
74     t.integer  "resource_picture_id",                :null => false\r
75     t.integer  "tail",                :default => 1, :null => false\r
76     t.integer  "border",              :default => 1, :null => false\r
77     t.integer  "min_width",           :default => 0, :null => false\r
78     t.integer  "max_width",           :default => 0, :null => false\r
79     t.integer  "min_height",          :default => 0, :null => false\r
80     t.integer  "max_height",          :default => 0, :null => false\r
81     t.datetime "created_at"\r
82     t.datetime "updated_at"\r
83   end\r
84 \r
85   add_index "balloon_templates", ["speach_balloon_id", "tail", "border"], :name => "sb_tb", :unique => true\r
86   add_index "balloon_templates", ["speach_balloon_id"], :name => "index_balloon_templates_on_speach_balloon_id"\r
87 \r
88   create_table "balloons", :force => true do |t|\r
89     t.integer  "panel_id",                           :null => false\r
90     t.integer  "balloon_template_id",                :null => false\r
91     t.integer  "resource_picture_id",                :null => false\r
92     t.integer  "tail",                :default => 1, :null => false\r
93     t.integer  "border",              :default => 1, :null => false\r
94     t.integer  "zindex",                             :null => false\r
95     t.integer  "top_offset",                         :null => false\r
96     t.integer  "left_offset",                        :null => false\r
97     t.integer  "width",                              :null => false\r
98     t.integer  "height",                             :null => false\r
99     t.datetime "created_at"\r
100     t.datetime "updated_at"\r
101   end\r
102 \r
103   add_index "balloons", ["panel_id", "zindex"], :name => "index_balloons_on_panel_id_and_zindex"\r
104   add_index "balloons", ["panel_id"], :name => "index_balloons_on_panel_id"\r
105 \r
106   create_table "comics", :force => true do |t|\r
107     t.string   "title"\r
108     t.integer  "default_width",  :default => 200, :null => false\r
109     t.integer  "default_height", :default => 80,  :null => false\r
110     t.integer  "author_id"\r
111     t.datetime "created_at"\r
112     t.datetime "updated_at"\r
113   end\r
114 \r
115   add_index "comics", ["author_id"], :name => "index_comics_on_author_id"\r
116 \r
117   create_table "common_lisences", :force => true do |t|\r
118     t.integer  "lisence_id",                       :null => false\r
119     t.string   "name",                             :null => false\r
120     t.string   "url",                              :null => false\r
121     t.integer  "cc_by",             :default => 0, :null => false\r
122     t.integer  "cc_sa",             :default => 0, :null => false\r
123     t.integer  "cc_nd",             :default => 0, :null => false\r
124     t.integer  "cc_nc",             :default => 0, :null => false\r
125     t.integer  "no_resize",         :default => 0, :null => false\r
126     t.integer  "no_flip",           :default => 0, :null => false\r
127     t.integer  "keep_aspect_ratio", :default => 0, :null => false\r
128     t.datetime "created_at"\r
129     t.datetime "updated_at"\r
130   end\r
131 \r
132   create_table "lisences", :force => true do |t|\r
133     t.string   "name",                             :null => false\r
134     t.string   "url",                              :null => false\r
135     t.integer  "cc_by",             :default => 0, :null => false\r
136     t.integer  "cc_sa",             :default => 0, :null => false\r
137     t.integer  "cc_nd",             :default => 0, :null => false\r
138     t.integer  "cc_nc",             :default => 0, :null => false\r
139     t.integer  "no_resize",         :default => 0, :null => false\r
140     t.integer  "no_flip",           :default => 0, :null => false\r
141     t.integer  "keep_aspect_ratio", :default => 0, :null => false\r
142     t.datetime "created_at"\r
143     t.datetime "updated_at"\r
144   end\r
145 \r
146   add_index "lisences", ["url"], :name => "index_lisences_on_url", :unique => true\r
147 \r
148   create_table "original_lisences", :force => true do |t|\r
149     t.integer  "artist_id",                        :null => false\r
150     t.integer  "lisence_id",                       :null => false\r
151     t.string   "name",                             :null => false\r
152     t.string   "url",                              :null => false\r
153     t.integer  "cc_by",             :default => 0, :null => false\r
154     t.integer  "cc_sa",             :default => 0, :null => false\r
155     t.integer  "cc_nd",             :default => 0, :null => false\r
156     t.integer  "cc_nc",             :default => 0, :null => false\r
157     t.integer  "no_resize",         :default => 0, :null => false\r
158     t.integer  "no_flip",           :default => 0, :null => false\r
159     t.integer  "keep_aspect_ratio", :default => 0, :null => false\r
160     t.datetime "created_at"\r
161     t.datetime "updated_at"\r
162   end\r
163 \r
164   create_table "original_pictures", :force => true do |t|\r
165     t.string   "ext",        :null => false\r
166     t.integer  "width",      :null => false\r
167     t.integer  "height",     :null => false\r
168     t.integer  "filesize",   :null => false\r
169     t.integer  "artist_id"\r
170     t.integer  "lisence_id"\r
171     t.datetime "created_at"\r
172     t.datetime "updated_at"\r
173   end\r
174 \r
175   add_index "original_pictures", ["artist_id"], :name => "index_original_pictures_on_artist_id"\r
176 \r
177   create_table "panel_pictures", :force => true do |t|\r
178     t.integer  "panel_id",                           :null => false\r
179     t.integer  "resource_picture_id",                :null => false\r
180     t.integer  "width",                              :null => false\r
181     t.integer  "height",                             :null => false\r
182     t.integer  "top_offset",                         :null => false\r
183     t.integer  "left_offset",                        :null => false\r
184     t.integer  "zindex",                             :null => false\r
185     t.integer  "v",                   :default => 0, :null => false\r
186     t.integer  "h",                   :default => 0, :null => false\r
187     t.datetime "created_at"\r
188     t.datetime "updated_at"\r
189   end\r
190 \r
191   add_index "panel_pictures", ["panel_id", "zindex"], :name => "index_panel_pictures_on_panel_id_and_zindex"\r
192 \r
193   create_table "panels", :force => true do |t|\r
194     t.integer  "comic_id",                             :null => false\r
195     t.integer  "resource_picture_id"\r
196     t.integer  "width",               :default => 200, :null => false\r
197     t.integer  "height",              :default => 80,  :null => false\r
198     t.integer  "border",              :default => 1,   :null => false\r
199     t.integer  "seqno",                                :null => false\r
200     t.integer  "author_id"\r
201     t.datetime "created_at"\r
202     t.datetime "updated_at"\r
203   end\r
204 \r
205   add_index "panels", ["author_id"], :name => "index_panels_on_author_id"\r
206   add_index "panels", ["comic_id", "seqno"], :name => "index_panels_on_comic_id_and_seqno"\r
207 \r
208   create_table "resource_pictures", :force => true do |t|\r
209     t.string   "ext",                 :null => false\r
210     t.integer  "width",               :null => false\r
211     t.integer  "height",              :null => false\r
212     t.integer  "filesize",            :null => false\r
213     t.integer  "artist_id"\r
214     t.integer  "lisence_id"\r
215     t.integer  "original_picture_id", :null => false\r
216     t.datetime "created_at"\r
217     t.datetime "updated_at"\r
218   end\r
219 \r
220   create_table "speach_balloons", :force => true do |t|\r
221     t.string   "name",                        :null => false\r
222     t.integer  "tail_limit",   :default => 1, :null => false\r
223     t.integer  "border_limit", :default => 1, :null => false\r
224     t.datetime "created_at"\r
225     t.datetime "updated_at"\r
226   end\r
227 \r
228   create_table "speach_templates", :force => true do |t|\r
229     t.integer  "balloon_template_id", :null => false\r
230     t.integer  "top_offset",          :null => false\r
231     t.integer  "left_offset",         :null => false\r
232     t.integer  "width",               :null => false\r
233     t.integer  "height",              :null => false\r
234     t.datetime "created_at"\r
235     t.datetime "updated_at"\r
236   end\r
237 \r
238   add_index "speach_templates", ["balloon_template_id"], :name => "index_speach_templates_on_balloon_template_id"\r
239 \r
240   create_table "speaches", :force => true do |t|\r
241     t.integer  "balloon_id",  :null => false\r
242     t.string   "content"\r
243     t.integer  "top_offset",  :null => false\r
244     t.integer  "left_offset", :null => false\r
245     t.integer  "width",       :null => false\r
246     t.integer  "height",      :null => false\r
247     t.datetime "created_at"\r
248     t.datetime "updated_at"\r
249   end\r
250 \r
251   add_index "speaches", ["balloon_id"], :name => "index_speaches_on_balloon_id"\r
252 \r
253   create_table "system_pictures", :force => true do |t|\r
254     t.string   "ext",        :null => false\r
255     t.integer  "width",      :null => false\r
256     t.integer  "height",     :null => false\r
257     t.integer  "filesize",   :null => false\r
258     t.datetime "created_at"\r
259     t.datetime "updated_at"\r
260   end\r
261 \r
262 end\r