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

10 lines
399 B
Ruby

# 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