OSDN Git Service

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