Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 13848 Bytes
1 | |
2 | ActiveRecord::Schema.define do |
3 | def except(adapter_names_to_exclude) |
4 | unless [adapter_names_to_exclude].flatten.include?(adapter_name) |
5 | yield |
6 | end |
7 | end |
8 | |
9 | #put adapter specific setup here |
10 | case adapter_name |
11 | # For Firebird, set the sequence values 10000 when create_table is called; |
12 | # this prevents primary key collisions between "normally" created records |
13 | # and fixture-based (YAML) records. |
14 | when "Firebird" |
15 | def create_table(*args, &block) |
16 | ActiveRecord::Base.connection.create_table(*args, &block) |
17 | ActiveRecord::Base.connection.execute "SET GENERATOR #{args.first}_seq TO 10000" |
18 | end |
19 | end |
20 | |
21 | |
22 | # Please keep these create table statements in alphabetical order |
23 | # unless the ordering matters. In which case, define them below |
24 | create_table :accounts, :force => true do |t| |
25 | t.integer :firm_id |
26 | t.string :firm_name |
27 | t.integer :credit_limit |
28 | end |
29 | |
30 | create_table :audit_logs, :force => true do |t| |
31 | t.column :message, :string, :null=>false |
32 | t.column :developer_id, :integer, :null=>false |
33 | end |
34 | |
35 | create_table :authors, :force => true do |t| |
36 | t.string :name, :null => false |
37 | t.integer :author_address_id |
38 | t.integer :author_address_extra_id |
39 | end |
40 | |
41 | create_table :author_addresses, :force => true do |t| |
42 | end |
43 | |
44 | create_table :author_favorites, :force => true do |t| |
45 | t.column :author_id, :integer |
46 | t.column :favorite_author_id, :integer |
47 | end |
48 | |
49 | |
50 | create_table :auto_id_tests, :force => true, :id => false do |t| |
51 | t.primary_key :auto_id |
52 | t.integer :value |
53 | end |
54 | |
55 | create_table :binaries, :force => true do |t| |
56 | t.binary :data |
57 | end |
58 | |
59 | create_table :birds, :force => true do |t| |
60 | t.string :name |
61 | t.string :color |
62 | t.integer :pirate_id |
63 | end |
64 | |
65 | create_table :books, :force => true do |t| |
66 | t.column :name, :string |
67 | end |
68 | |
69 | create_table :booleantests, :force => true do |t| |
70 | t.boolean :value |
71 | end |
72 | |
73 | create_table "CamelCase", :force => true do |t| |
74 | t.string :name |
75 | end |
76 | |
77 | create_table :categories, :force => true do |t| |
78 | t.string :name, :null => false |
79 | t.string :type |
80 | t.integer :categorizations_count |
81 | end |
82 | |
83 | create_table :categories_posts, :force => true, :id => false do |t| |
84 | t.integer :category_id, :null => false |
85 | t.integer :post_id, :null => false |
86 | end |
87 | |
88 | create_table :categorizations, :force => true do |t| |
89 | t.column :category_id, :integer |
90 | t.column :post_id, :integer |
91 | t.column :author_id, :integer |
92 | end |
93 | |
94 | create_table :citations, :force => true do |t| |
95 | t.column :book1_id, :integer |
96 | t.column :book2_id, :integer |
97 | end |
98 | |
99 | create_table :clubs, :force => true do |t| |
100 | t.string :name |
101 | end |
102 | |
103 | create_table :colnametests, :force => true do |t| |
104 | t.integer :references, :null => false |
105 | end |
106 | |
107 | create_table :comments, :force => true do |t| |
108 | t.integer :post_id, :null => false |
109 | t.text :body, :null => false |
110 | t.string :type |
111 | end |
112 | |
113 | create_table :companies, :force => true do |t| |
114 | t.string :type |
115 | t.string :ruby_type |
116 | t.integer :firm_id |
117 | t.string :firm_name |
118 | t.string :name |
119 | t.integer :client_of |
120 | t.integer :rating, :default => 1 |
121 | end |
122 | |
123 | add_index :companies, [:firm_id, :type, :rating, :ruby_type], :name => "company_index" |
124 | |
125 | create_table :computers, :force => true do |t| |
126 | t.integer :developer, :null => false |
127 | t.integer :extendedWarranty, :null => false |
128 | end |
129 | |
130 | create_table :contracts, :force => true do |t| |
131 | t.integer :developer_id |
132 | t.integer :company_id |
133 | end |
134 | |
135 | create_table :customers, :force => true do |t| |
136 | t.string :name |
137 | t.integer :balance, :default => 0 |
138 | t.string :address_street |
139 | t.string :address_city |
140 | t.string :address_country |
141 | t.string :gps_location |
142 | end |
143 | |
144 | create_table :developers, :force => true do |t| |
145 | t.string :name |
146 | t.integer :salary, :default => 70000 |
147 | t.datetime :created_at |
148 | t.datetime :updated_at |
149 | end |
150 | |
151 | create_table :developers_projects, :force => true, :id => false do |t| |
152 | t.integer :developer_id, :null => false |
153 | t.integer :project_id, :null => false |
154 | t.date :joined_on |
155 | t.integer :access_level, :default => 1 |
156 | end |
157 | |
158 | create_table :edges, :force => true do |t| |
159 | t.column :source_id, :integer, :null => false |
160 | t.column :sink_id, :integer, :null => false |
161 | end |
162 | add_index :edges, [:source_id, :sink_id], :unique => true, :name => 'unique_edge_index' |
163 | |
164 | |
165 | create_table :entrants, :force => true do |t| |
166 | t.string :name, :null => false |
167 | t.integer :course_id, :null => false |
168 | end |
169 | |
170 | create_table :essays, :force => true do |t| |
171 | t.string :name |
172 | t.string :writer_id |
173 | t.string :writer_type |
174 | end |
175 | |
176 | create_table :events, :force => true do |t| |
177 | t.string :title, :limit => 5 |
178 | t.datetime :ends_on |
179 | end |
180 | |
181 | create_table :event_authors, :force => true do |t| |
182 | t.integer :event_id |
183 | t.integer :author_id |
184 | end |
185 | |
186 | create_table :funny_jokes, :force => true do |t| |
187 | t.string :name |
188 | end |
189 | |
190 | create_table :goofy_string_id, :force => true, :id => false do |t| |
191 | t.string :id, :null => false |
192 | t.string :info |
193 | end |
194 | |
195 | create_table :invoices, :force => true do |t| |
196 | t.integer :balance |
197 | t.datetime :updated_at |
198 | end |
199 | |
200 | create_table :items, :force => true do |t| |
201 | t.column :name, :integer |
202 | end |
203 | |
204 | create_table :inept_wizards, :force => true do |t| |
205 | t.column :name, :string, :null => false |
206 | t.column :city, :string, :null => false |
207 | t.column :type, :string |
208 | end |
209 | |
210 | |
211 | create_table :jobs, :force => true do |t| |
212 | t.integer :ideal_reference_id |
213 | end |
214 | |
215 | create_table :keyboards, :force => true, :id => false do |t| |
216 | t.primary_key :key_number |
217 | t.string :name |
218 | end |
219 | |
220 | create_table :legacy_things, :force => true do |t| |
221 | t.integer :tps_report_number |
222 | t.integer :version, :null => false, :default => 0 |
223 | end |
224 | |
225 | create_table :line_items, :force => true do |t| |
226 | t.integer :invoice_id |
227 | t.integer :amount |
228 | end |
229 | |
230 | create_table :lock_without_defaults, :force => true do |t| |
231 | t.column :lock_version, :integer |
232 | end |
233 | |
234 | create_table :lock_without_defaults_cust, :force => true do |t| |
235 | t.column :custom_lock_version, :integer |
236 | end |
237 | |
238 | create_table :mateys, :id => false, :force => true do |t| |
239 | t.column :pirate_id, :integer |
240 | t.column :target_id, :integer |
241 | t.column :weight, :integer |
242 | end |
243 | |
244 | create_table :members, :force => true do |t| |
245 | t.string :name |
246 | t.integer :member_type_id |
247 | end |
248 | |
249 | create_table :member_details, :force => true do |t| |
250 | t.integer :member_id |
251 | t.integer :organization_id |
252 | t.string :extra_data |
253 | end |
254 | |
255 | create_table :memberships, :force => true do |t| |
256 | t.datetime :joined_on |
257 | t.integer :club_id, :member_id |
258 | t.boolean :favourite, :default => false |
259 | t.string :type |
260 | end |
261 | |
262 | create_table :member_types, :force => true do |t| |
263 | t.string :name |
264 | end |
265 | |
266 | create_table :references, :force => true do |t| |
267 | t.integer :person_id |
268 | t.integer :job_id |
269 | t.boolean :favourite |
270 | t.integer :lock_version, :default => 0 |
271 | end |
272 | |
273 | create_table :minimalistics, :force => true do |t| |
274 | end |
275 | |
276 | create_table :mixed_case_monkeys, :force => true, :id => false do |t| |
277 | t.primary_key :monkeyID |
278 | t.integer :fleaCount |
279 | end |
280 | |
281 | create_table :mixins, :force => true do |t| |
282 | t.integer :parent_id |
283 | t.integer :pos |
284 | t.datetime :created_at |
285 | t.datetime :updated_at |
286 | t.integer :lft |
287 | t.integer :rgt |
288 | t.integer :root_id |
289 | t.string :type |
290 | end |
291 | |
292 | create_table :movies, :force => true, :id => false do |t| |
293 | t.primary_key :movieid |
294 | t.string :name |
295 | end |
296 | |
297 | create_table :numeric_data, :force => true do |t| |
298 | t.decimal :bank_balance, :precision => 10, :scale => 2 |
299 | t.decimal :big_bank_balance, :precision => 15, :scale => 2 |
300 | t.decimal :world_population, :precision => 10, :scale => 0 |
301 | t.decimal :my_house_population, :precision => 2, :scale => 0 |
302 | t.decimal :decimal_number_with_default, :precision => 3, :scale => 2, :default => 2.78 |
303 | t.float :temperature |
304 | end |
305 | |
306 | create_table :orders, :force => true do |t| |
307 | t.string :name |
308 | t.integer :billing_customer_id |
309 | t.integer :shipping_customer_id |
310 | end |
311 | |
312 | create_table :organizations, :force => true do |t| |
313 | t.string :name |
314 | end |
315 | |
316 | create_table :owners, :primary_key => :owner_id ,:force => true do |t| |
317 | t.string :name |
318 | t.column :updated_at, :datetime |
319 | t.column :happy_at, :datetime |
320 | end |
321 | |
322 | |
323 | create_table :paint_colors, :force => true do |t| |
324 | t.integer :non_poly_one_id |
325 | end |
326 | |
327 | create_table :paint_textures, :force => true do |t| |
328 | t.integer :non_poly_two_id |
329 | end |
330 | |
331 | create_table :parrots, :force => true do |t| |
332 | t.column :name, :string |
333 | t.column :parrot_sti_class, :string |
334 | t.column :killer_id, :integer |
335 | t.column :created_at, :datetime |
336 | t.column :created_on, :datetime |
337 | t.column :updated_at, :datetime |
338 | t.column :updated_on, :datetime |
339 | end |
340 | |
341 | create_table :parrots_pirates, :id => false, :force => true do |t| |
342 | t.column :parrot_id, :integer |
343 | t.column :pirate_id, :integer |
344 | end |
345 | |
346 | create_table :parrots_treasures, :id => false, :force => true do |t| |
347 | t.column :parrot_id, :integer |
348 | t.column :treasure_id, :integer |
349 | end |
350 | |
351 | create_table :people, :force => true do |t| |
352 | t.string :first_name, :null => false |
353 | t.references :primary_contact |
354 | t.string :gender, :limit => 1 |
355 | t.integer :lock_version, :null => false, :default => 0 |
356 | end |
357 | |
358 | create_table :pets, :primary_key => :pet_id ,:force => true do |t| |
359 | t.string :name |
360 | t.integer :owner_id, :integer |
361 | end |
362 | |
363 | create_table :pirates, :force => true do |t| |
364 | t.column :catchphrase, :string |
365 | t.column :parrot_id, :integer |
366 | t.column :created_on, :datetime |
367 | t.column :updated_on, :datetime |
368 | end |
369 | |
370 | create_table :posts, :force => true do |t| |
371 | t.integer :author_id |
372 | t.string :title, :null => false |
373 | t.text :body, :null => false |
374 | t.string :type |
375 | t.integer :comments_count, :default => 0 |
376 | t.integer :taggings_count, :default => 0 |
377 | end |
378 | |
379 | create_table :price_estimates, :force => true do |t| |
380 | t.string :estimate_of_type |
381 | t.integer :estimate_of_id |
382 | t.integer :price |
383 | end |
384 | |
385 | create_table :projects, :force => true do |t| |
386 | t.string :name |
387 | t.string :type |
388 | end |
389 | |
390 | create_table :readers, :force => true do |t| |
391 | t.integer :post_id, :null => false |
392 | t.integer :person_id, :null => false |
393 | end |
394 | |
395 | create_table :shape_expressions, :force => true do |t| |
396 | t.string :paint_type |
397 | t.integer :paint_id |
398 | t.string :shape_type |
399 | t.integer :shape_id |
400 | end |
401 | |
402 | create_table :ships, :force => true do |t| |
403 | t.string :name |
404 | t.integer :pirate_id |
405 | t.datetime :created_at |
406 | t.datetime :created_on |
407 | t.datetime :updated_at |
408 | t.datetime :updated_on |
409 | end |
410 | |
411 | create_table :ship_parts, :force => true do |t| |
412 | t.string :name |
413 | t.integer :ship_id |
414 | end |
415 | |
416 | create_table :sponsors, :force => true do |t| |
417 | t.integer :club_id |
418 | t.integer :sponsorable_id |
419 | t.string :sponsorable_type |
420 | end |
421 | |
422 | create_table :subscribers, :force => true, :id => false do |t| |
423 | t.string :nick, :null => false |
424 | t.string :name |
425 | end |
426 | add_index :subscribers, :nick, :unique => true |
427 | |
428 | create_table :subscriptions, :force => true do |t| |
429 | t.string :subscriber_id |
430 | t.integer :book_id |
431 | end |
432 | |
433 | create_table :tasks, :force => true do |t| |
434 | t.datetime :starting |
435 | t.datetime :ending |
436 | end |
437 | |
438 | create_table :topics, :force => true do |t| |
439 | t.string :title |
440 | t.string :author_name |
441 | t.string :author_email_address |
442 | t.datetime :written_on |
443 | t.time :bonus_time |
444 | t.date :last_read |
445 | t.text :content |
446 | t.boolean :approved, :default => true |
447 | t.integer :replies_count, :default => 0 |
448 | t.integer :parent_id |
449 | t.string :parent_title |
450 | t.string :type |
451 | end |
452 | |
453 | create_table :taggings, :force => true do |t| |
454 | t.column :tag_id, :integer |
455 | t.column :super_tag_id, :integer |
456 | t.column :taggable_type, :string |
457 | t.column :taggable_id, :integer |
458 | end |
459 | |
460 | create_table :tags, :force => true do |t| |
461 | t.column :name, :string |
462 | t.column :taggings_count, :integer, :default => 0 |
463 | end |
464 | |
465 | create_table :toys, :primary_key => :toy_id ,:force => true do |t| |
466 | t.string :name |
467 | t.integer :pet_id, :integer |
468 | end |
469 | |
470 | create_table :treasures, :force => true do |t| |
471 | t.column :name, :string |
472 | t.column :looter_id, :integer |
473 | t.column :looter_type, :string |
474 | end |
475 | |
476 | create_table :vertices, :force => true do |t| |
477 | t.column :label, :string |
478 | end |
479 | |
480 | create_table 'warehouse-things', :force => true do |t| |
481 | t.integer :value |
482 | end |
483 | |
484 | [:circles, :squares, :triangles, :non_poly_ones, :non_poly_twos].each do |t| |
485 | create_table(t, :force => true) { } |
486 | end |
487 | |
488 | create_table :guids, :force => true do |t| |
489 | t.column :key, :string |
490 | end |
491 | |
492 | create_table :integer_limits, :force => true do |t| |
493 | t.integer :"c_int_without_limit" |
494 | (1..8).each do |i| |
495 | t.integer :"c_int_#{i}", :limit => i |
496 | end |
497 | end |
498 | |
499 | # NOTE - the following 4 tables are used by models that have :inverse_of options on the associations |
500 | create_table :men, :force => true do |t| |
501 | t.string :name |
502 | end |
503 | |
504 | create_table :faces, :force => true do |t| |
505 | t.string :description |
506 | t.integer :man_id |
507 | t.integer :polymorphic_man_id |
508 | t.string :polymorphic_man_type |
509 | end |
510 | |
511 | create_table :interests, :force => true do |t| |
512 | t.string :topic |
513 | t.integer :man_id |
514 | t.integer :polymorphic_man_id |
515 | t.string :polymorphic_man_type |
516 | t.integer :zine_id |
517 | end |
518 | |
519 | create_table :zines, :force => true do |t| |
520 | t.string :title |
521 | end |
522 | |
523 | except 'SQLite' do |
524 | # fk_test_has_fk should be before fk_test_has_pk |
525 | create_table :fk_test_has_fk, :force => true do |t| |
526 | t.integer :fk_id, :null => false |
527 | end |
528 | |
529 | create_table :fk_test_has_pk, :force => true do |t| |
530 | end |
531 | |
532 | execute "ALTER TABLE fk_test_has_fk ADD CONSTRAINT fk_name FOREIGN KEY (#{quote_column_name 'fk_id'}) REFERENCES #{quote_table_name 'fk_test_has_pk'} (#{quote_column_name 'id'})" |
533 | end |
534 | end |