diff options
author | Xavier Noria <fxn@hashref.com> | 2010-10-22 16:54:23 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-10-22 16:55:02 +0200 |
commit | a031fc57c85b78a51769ab304fdae9c9fac6c84e (patch) | |
tree | 1f122b75911c24d4be6ce53e950627235df3ba49 /activerecord | |
parent | 5b86c3e5bb2bb54003d8f211b46a7b992355dbf5 (diff) | |
download | rails-a031fc57c85b78a51769ab304fdae9c9fac6c84e.tar.gz rails-a031fc57c85b78a51769ab304fdae9c9fac6c84e.tar.bz2 rails-a031fc57c85b78a51769ab304fdae9c9fac6c84e.zip |
made a pass in AR's schema.rb to keep (most) create statements in lexicographic order, and fixed an FK
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/schema/schema.rb | 119 |
1 files changed, 60 insertions, 59 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb index fe59d8aeec..bb80a1ca17 100644 --- a/activerecord/test/schema/schema.rb +++ b/activerecord/test/schema/schema.rb @@ -18,8 +18,13 @@ ActiveRecord::Schema.define do end - # Please keep these create table statements in alphabetical order - # unless the ordering matters. In which case, define them below + # ------------------------------------------------------------------- # + # # + # Please keep these create table statements in alphabetical order # + # unless the ordering matters. In which case, define them below. # + # # + # ------------------------------------------------------------------- # + create_table :accounts, :force => true do |t| t.integer :firm_id t.string :firm_name @@ -54,7 +59,6 @@ ActiveRecord::Schema.define do t.column :favorite_author_id, :integer end - create_table :auto_id_tests, :force => true, :id => false do |t| t.primary_key :auto_id t.integer :value @@ -78,6 +82,11 @@ ActiveRecord::Schema.define do t.boolean :value end + create_table :bulbs, :force => true do |t| + t.integer :car_id + t.string :name + end + create_table "CamelCase", :force => true do |t| t.string :name end @@ -156,11 +165,6 @@ ActiveRecord::Schema.define do t.integer :company_id end - create_table :iris, :force => true do |t| - t.integer :eye - t.string :color - end - create_table :customers, :force => true do |t| t.string :name t.integer :balance, :default => 0 @@ -199,18 +203,6 @@ ActiveRecord::Schema.define do t.integer :car_id end - create_table :eyes, :force => true do |t| - end - - create_table :tyres, :force => true do |t| - t.integer :car_id - end - - create_table :bulbs, :force => true do |t| - t.integer :car_id - t.string :name - end - create_table :entrants, :force => true do |t| t.string :name, :null => false t.integer :course_id, :null => false @@ -226,6 +218,9 @@ ActiveRecord::Schema.define do t.string :title, :limit => 5 end + create_table :eyes, :force => true do |t| + end + create_table :funny_jokes, :force => true do |t| t.string :name end @@ -235,13 +230,8 @@ ActiveRecord::Schema.define do t.string :info end - create_table :invoices, :force => true do |t| - t.integer :balance - t.datetime :updated_at - end - - create_table :items, :force => true do |t| - t.column :name, :string + create_table :guids, :force => true do |t| + t.column :key, :string end create_table :inept_wizards, :force => true do |t| @@ -250,6 +240,26 @@ ActiveRecord::Schema.define do t.column :type, :string end + create_table :integer_limits, :force => true do |t| + t.integer :"c_int_without_limit" + (1..8).each do |i| + t.integer :"c_int_#{i}", :limit => i + end + end + + create_table :invoices, :force => true do |t| + t.integer :balance + t.datetime :updated_at + end + + create_table :iris, :force => true do |t| + t.references :eye + t.string :color + end + + create_table :items, :force => true do |t| + t.column :name, :string + end create_table :jobs, :force => true do |t| t.integer :ideal_reference_id @@ -306,13 +316,6 @@ ActiveRecord::Schema.define do t.string :name end - create_table :references, :force => true do |t| - t.integer :person_id - t.integer :job_id - t.boolean :favourite - t.integer :lock_version, :default => 0 - end - create_table :minivans, :force => true, :id => false do |t| t.string :minivan_id t.string :name @@ -375,7 +378,6 @@ ActiveRecord::Schema.define do t.column :happy_at, :datetime end - create_table :paint_colors, :force => true do |t| t.integer :non_poly_one_id end @@ -462,6 +464,13 @@ ActiveRecord::Schema.define do t.boolean :skimmer, :default => false end + create_table :references, :force => true do |t| + t.integer :person_id + t.integer :job_id + t.boolean :favourite + t.integer :lock_version, :default => 0 + end + create_table :shape_expressions, :force => true do |t| t.string :paint_type t.integer :paint_id @@ -506,6 +515,18 @@ ActiveRecord::Schema.define do t.integer :book_id end + create_table :tags, :force => true do |t| + t.column :name, :string + t.column :taggings_count, :integer, :default => 0 + end + + create_table :taggings, :force => true do |t| + t.column :tag_id, :integer + t.column :super_tag_id, :integer + t.column :taggable_type, :string + t.column :taggable_id, :integer + end + create_table :tasks, :force => true do |t| t.datetime :starting t.datetime :ending @@ -533,18 +554,6 @@ ActiveRecord::Schema.define do t.string :group end - create_table :taggings, :force => true do |t| - t.column :tag_id, :integer - t.column :super_tag_id, :integer - t.column :taggable_type, :string - t.column :taggable_id, :integer - end - - create_table :tags, :force => true do |t| - t.column :name, :string - t.column :taggings_count, :integer, :default => 0 - end - create_table :toys, :primary_key => :toy_id ,:force => true do |t| t.string :name t.integer :pet_id, :integer @@ -564,6 +573,10 @@ ActiveRecord::Schema.define do t.column :looter_type, :string end + create_table :tyres, :force => true do |t| + t.integer :car_id + end + create_table :variants, :force => true do |t| t.references :product t.string :name @@ -581,17 +594,6 @@ ActiveRecord::Schema.define do create_table(t, :force => true) { } end - create_table :guids, :force => true do |t| - t.column :key, :string - end - - create_table :integer_limits, :force => true do |t| - t.integer :"c_int_without_limit" - (1..8).each do |i| - t.integer :"c_int_#{i}", :limit => i - end - end - # NOTE - the following 4 tables are used by models that have :inverse_of options on the associations create_table :men, :force => true do |t| t.string :name @@ -647,7 +649,6 @@ ActiveRecord::Schema.define do t.string :name end - except 'SQLite' do # fk_test_has_fk should be before fk_test_has_pk create_table :fk_test_has_fk, :force => true do |t| |