indexes and created_at fields

git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@124 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7
master
andrew 2008-02-03 05:50:41 +00:00
parent 6fc4b1c30e
commit 98a3db040b
5 changed files with 10 additions and 0 deletions

View File

@ -7,10 +7,14 @@ class CreatePages < ActiveRecord::Migration
t.column :owner_id, :integer
t.column :owner_type, :string, :limit => 32
t.column :version, :integer
t.column :created_at, :timestamp
t.column :updated_at, :timestamp
t.column :created_by, :integer
t.column :updated_by, :integer
end
add_index :pages, :title
add_index :pages, :owner_id
add_index :pages, :owner_type
add_index :pages, :created_by
add_index :pages, :updated_by
Page.create_versioned_table

View File

@ -6,7 +6,9 @@ class CreateBeers < ActiveRecord::Migration
t.column :original_gravity, :float
t.column :final_gravity, :float
t.column :style_id, :integer
t.column :created_at, :timestamp
end
add_index :beers, :title
add_index :beers, :style_id
end

View File

@ -8,9 +8,11 @@ class CreateBreweries < ActiveRecord::Migration
t.column :state, :string
t.column :postal_code, :string
t.column :country, :string
t.column :created_at, :timestamp
end
add_column :beers, :brewery_id, :integer
add_index :beers, :brewery_id
add_index :breweries, :title
end
def self.down

View File

@ -5,6 +5,7 @@ class CreatePeoples < ActiveRecord::Migration
t.column :role_id, :integer
t.column :encrypted_password, :string, :limit => 512
t.column :salt, :string, :limit => 512
t.column :created_at, :timestamp
end
add_index :peoples, :title
add_index :peoples, :role_id

View File

@ -11,6 +11,7 @@ class CreateTagImages < ActiveRecord::Migration
add_index :tag_images, :image_id
add_index :tag_images, :tagged_id
add_index :tag_images, :tagged_type
add_index :tag_images, :primary
end
def self.down