Homies and money moves
This commit is contained in:
10
db/migrate/20190620194110_create_homies.rb
Normal file
10
db/migrate/20190620194110_create_homies.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class CreateHomies < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :homies do |t|
|
||||
t.text :name, null: false
|
||||
t.integer :importance, null: false, default: 5
|
||||
t.text :about
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
11
db/migrate/20190620200006_create_money_moves.rb
Normal file
11
db/migrate/20190620200006_create_money_moves.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class CreateMoneyMoves < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :money_moves do |t|
|
||||
t.text :description
|
||||
t.decimal :amount, precision: 12, scale: 3
|
||||
t.integer :from_homie_id, null: false
|
||||
t.integer :to_homie_id, null: false
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user