Dump of some setup but no feature adds
This commit is contained in:
parent
6e2414eb2e
commit
3978fec3d6
6 changed files with 53 additions and 1 deletions
13
db/migrate/20130811184122_create_lifts.rb
Normal file
13
db/migrate/20130811184122_create_lifts.rb
Normal 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
|
9
db/migrate/20130811190304_fix_association_in_lifts.rb
Normal file
9
db/migrate/20130811190304_fix_association_in_lifts.rb
Normal 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
|
12
db/schema.rb
12
db/schema.rb
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue