Sha256: 27c9783048566717ef807871e017ef21c04da633999f19a13c04fefb480c0af3
Contents?: true
Size: 1.37 KB
Versions: 12
Compression:
Stored size: 1.37 KB
Contents
class AddAdditionalFields < ActiveRecord::Migration[7.1] def change add_column :comee_core_client_addresses, :name, :string, null: false, default: "Default" add_column :comee_core_products, :customs_description, :string, null: true add_column :comee_core_suppliers, :payment_terms, :string, null: false, default: "30 Days Net" add_column :comee_core_suppliers, :vat_number, :string, null: true add_column :comee_core_suppliers, :tax_code, :string, null: true add_column :comee_core_clients, :tax_code, :string, null: true add_column :comee_core_clients, :vat_number, :string, null: true add_column :comee_core_master_prices, :state_of_origin, :string, null: true add_reference :comee_core_master_prices, :country_of_origin, null: true, index: {name: "coo_on_ccmp_indx"}, foreign_key: {to_table: :comee_core_lookups} add_reference :comee_core_clients, :country, null: true, index: {name: "country_on_ccc_indx"}, foreign_key: {to_table: :comee_core_lookups} reversible do |dir| dir.up do execute <<-SQL UPDATE comee_core_products SET customs_description = description SQL end end change_column_null :comee_core_products, :customs_description, false end end
Version data entries
12 entries across 12 versions & 1 rubygems