Sha256: 8d5de2e77fb33709f4222d22dbea1786601c34a50ff6477a5767a35233c8ddd9

Contents?: true

Size: 545 Bytes

Versions: 11

Compression:

Stored size: 545 Bytes

Contents

class CreateOrderPartyRoles
  
  def self.up
    order_roles = BizTxnPartyRoleType.create(
      :description => 'Order Roles',
      :internal_identifier => 'order_roles'
    )

    buyor_role = BizTxnPartyRoleType.create(
      :description => 'Payor',
      :internal_identifier => 'payor'
    )

    buyor_role.move_to_child_of(order_roles)
    buyor_role.save
  end
  
  def self.down
    BizTxnPartyRoleType.find_by_internal_identifier('payor').destroy
    BizTxnPartyRoleType.find_by_internal_identifier('order_roles').destroy
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
erp_orders-4.2.0 db/data_migrations/20110605231556_create_order_party_roles.rb
erp_orders-4.0.0 db/data_migrations/20110605231556_create_order_party_roles.rb
erp_orders-3.1.1 db/data_migrations/20110605231556_create_order_party_roles.rb
erp_orders-3.1.0 db/data_migrations/20110605231556_create_order_party_roles.rb
erp_orders-3.0.6 db/data_migrations/20110605231556_create_order_party_roles.rb
erp_orders-3.0.5 db/data_migrations/20110605231556_create_order_party_roles.rb
erp_orders-3.0.4 db/data_migrations/20110605231556_create_order_party_roles.rb
erp_orders-3.0.3 db/data_migrations/20110605231556_create_order_party_roles.rb
erp_orders-3.0.2 db/data_migrations/20110605231556_create_order_party_roles.rb
erp_orders-3.0.1 db/data_migrations/20110605231556_create_order_party_roles.rb
erp_orders-3.0.0 db/data_migrations/20110605231556_create_order_party_roles.rb