Module: TbCheckout::Schema::Statements
- Defined in:
- lib/tb_checkout/schema.rb
Instance Method Summary collapse
-
#add_tb_checkout_purchasable(table_name) ⇒ Object
Add purchasable columns to the given database table.
-
#remove_tb_checkout_purchasable(table_name) ⇒ Object
Remove purchasable columns from the given database table.
Instance Method Details
#add_tb_checkout_purchasable(table_name) ⇒ Object
Add purchasable columns to the given database table
16 17 18 19 |
# File 'lib/tb_checkout/schema.rb', line 16 def add_tb_checkout_purchasable(table_name) add_column(table_name, :description, :string) add_column(table_name, :price, :decimal, :precision => 8, :scale => 2) end |
#remove_tb_checkout_purchasable(table_name) ⇒ Object
Remove purchasable columns from the given database table
23 24 25 26 |
# File 'lib/tb_checkout/schema.rb', line 23 def remove_tb_checkout_purchasable(table_name) remove_column(table_name, :description) remove_column(table_name, :price) end |