Dump of some setup but no feature adds

This commit is contained in:
Andrew Tomaka 2013-08-12 03:31:42 -04:00
parent 6e2414eb2e
commit 3978fec3d6
6 changed files with 53 additions and 1 deletions

View file

@ -0,0 +1,13 @@
class CreateLifts < ActiveRecord::Migration
def change
create_table :lifts do |t|
t.integer :parent_workout
t.string :lift_type
t.integer :sets
t.integer :repititions
t.text :comment
t.timestamps
end
end
end

View file

@ -0,0 +1,9 @@
class FixAssociationInLifts < ActiveRecord::Migration
def self.up
rename_column :lifts, :parent_workout, :workout_id
end
def self.down
rename_column :lifts, :workout_id, :parent_workout
end
end

View file

@ -11,7 +11,17 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20130811021123) do
ActiveRecord::Schema.define(version: 20130811190304) do
create_table "lifts", force: true do |t|
t.integer "workout_id"
t.string "lift_type"
t.integer "sets"
t.integer "repititions"
t.text "comment"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "workouts", force: true do |t|
t.date "date"