Update workouts date column type
This commit is contained in:
parent
6ce043edbb
commit
daf34100ec
4 changed files with 13 additions and 4 deletions
9
db/migrate/20130810061810_change_type_in_workouts.rb
Normal file
9
db/migrate/20130810061810_change_type_in_workouts.rb
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
class ChangeTypeInWorkouts < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
change_column :workouts, :date, :date
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
change_column :workouts, :date, :datetime
|
||||||
|
end
|
||||||
|
end
|
|
@ -11,10 +11,10 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20130805003121) do
|
ActiveRecord::Schema.define(version: 20130810061810) do
|
||||||
|
|
||||||
create_table "workouts", force: true do |t|
|
create_table "workouts", force: true do |t|
|
||||||
t.datetime "date"
|
t.date "date"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe "Workouts" do
|
describe "Workouts" do
|
||||||
before :all do
|
before :each do
|
||||||
@workout = FactoryGirl.create(:workout)
|
@workout = FactoryGirl.create(:workout)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ RSpec.configure do |config|
|
||||||
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
||||||
# examples within a transaction, remove the following line or assign false
|
# examples within a transaction, remove the following line or assign false
|
||||||
# instead of true.
|
# instead of true.
|
||||||
config.use_transactional_fixtures = true
|
config.use_transactional_fixtures = false
|
||||||
|
|
||||||
# If true, the base class of anonymous controllers will be inferred
|
# If true, the base class of anonymous controllers will be inferred
|
||||||
# automatically. This will be the default behavior in future versions of
|
# automatically. This will be the default behavior in future versions of
|
||||||
|
|
Loading…
Reference in a new issue