Permalink
Browse files

renamed a column

  • Loading branch information...
1 parent 8d3d9b8 commit 741945dd80830ee480a387166e9959a8074b815d @florida committed Nov 14, 2012
@@ -32,8 +32,8 @@
<%= f.text_field :image_url %>
</section>
<section class="field">
- <%= f.label :availability %>
- <%= f.check_box :availability %>
+ <%= f.label :available %>
+ <%= f.check_box :available %>
</section>
<section class="actions">
<%= f.submit %>
@@ -0,0 +1,9 @@
+class RenameColumnAvailabilityToAvailableInProducts < ActiveRecord::Migration
+ def up
+ rename_column :products, :availability, :available
+ end
+
+ def down
+ rename_column :products, :available, :availability
+ end
+end
View
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20121114042640) do
+ActiveRecord::Schema.define(:version => 20121114043900) do
create_table "lineitems", :force => true do |t|
t.integer "product_id"
@@ -40,10 +40,10 @@
t.text "description"
t.float "price"
t.integer "stock_no"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.string "image_url"
- t.boolean "availability"
+ t.boolean "available"
end
create_table "users", :force => true do |t|

0 comments on commit 741945d

Please sign in to comment.