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
|
Loading…
Add table
Add a link
Reference in a new issue