diff --git a/db/migrate/002_create_pages.rb b/db/migrate/002_create_pages.rb index 0bebd00..fe02b23 100644 --- a/db/migrate/002_create_pages.rb +++ b/db/migrate/002_create_pages.rb @@ -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 diff --git a/db/migrate/003_create_beers.rb b/db/migrate/003_create_beers.rb index 28d6f3a..8d3b38b 100644 --- a/db/migrate/003_create_beers.rb +++ b/db/migrate/003_create_beers.rb @@ -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 diff --git a/db/migrate/004_create_breweries.rb b/db/migrate/004_create_breweries.rb index 195f3b3..585628f 100644 --- a/db/migrate/004_create_breweries.rb +++ b/db/migrate/004_create_breweries.rb @@ -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 diff --git a/db/migrate/008_create_peoples.rb b/db/migrate/008_create_peoples.rb index 7ad83cf..ee91257 100644 --- a/db/migrate/008_create_peoples.rb +++ b/db/migrate/008_create_peoples.rb @@ -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 diff --git a/db/migrate/012_create_tag_images.rb b/db/migrate/012_create_tag_images.rb index 7a6e71d..95d71aa 100644 --- a/db/migrate/012_create_tag_images.rb +++ b/db/migrate/012_create_tag_images.rb @@ -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