0
create_table :offers do |t|
t.numeric(15,2) :total_sales
t.numeric(10,2) :price
t.numeric(10,2) :discount
end
我收到此錯誤如何使規模和精度的數值數據類型在創建表
create_offers.rb:12: syntax error, unexpected ':', expecting keyword_end
t.numeric(15,2) :total_sales
^
/home/gvpmahesh/code/present-app/present/db/migrate/20161017072207_create_offers.rb:13: syntax error, unexpected ':', expecting keyword_end
t.numeric(10,2) :price
^
/home/gvpmahesh/code/present-app/present/db/migrate/20161017072207_create_offers.rb:14: syntax error, unexpected ':', expecting keyword_end
t.numeric(10,2) :discount
^