1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/db/migrate/20221206100225_add_external_id_to_invoicing_profile.rb

10 lines
399 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# From this migration users can be identified by an unique external ID
class AddExternalIdToInvoicingProfile < ActiveRecord::Migration[5.2]
def change
add_column :invoicing_profiles, :external_id, :string, null: true
add_index :invoicing_profiles, :external_id, unique: true, where: '(external_id IS NOT NULL)', name: 'unique_not_null_external_id'
end
end