mirror of https://github.com/docusealco/docuseal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
565 B
15 lines
565 B
# frozen_string_literal: true
|
|
|
|
class AddIsFirstToCompletedSubmitters < ActiveRecord::Migration[8.0]
|
|
def change
|
|
# rubocop:disable Rails/ThreeStateBooleanColumn
|
|
add_column :completed_submitters, :is_first, :boolean
|
|
# rubocop:enable Rails/ThreeStateBooleanColumn
|
|
|
|
add_index :completed_submitters, %i[account_id completed_at],
|
|
where: 'is_first = TRUE',
|
|
name: 'index_completed_submitters_account_id_completed_at_is_first'
|
|
add_index :completed_submitters, :submission_id, unique: true, where: 'is_first = TRUE'
|
|
end
|
|
end
|