Skip to content

Commit

Permalink
LTI-393: removed unique indexes from tool
Browse files Browse the repository at this point in the history
  • Loading branch information
jfederico committed Jun 28, 2024
1 parent ca95761 commit 6ce5bbf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,9 @@ def self.up
add_index('rails_lti2_provider_tools', %w[id], name: 'index_id')
add_index('rails_lti2_provider_tools', %w[uuid], name: 'index_uuid')
add_index('rails_lti2_provider_tools', %w[uuid shared_secret], name: 'index_uuid_shared_secret')

# Add unique index on uuid only if lti_version is 'LTI_1.1'
add_index(:rails_lti2_provider_tools, :uuid, unique: true, where: "lti_version = 'LTI-1p0'", name: 'index_uuid_lti_1_1')

# Add unique index on uuid and shared_secret only if lti_version is 'LTI_1.3'
add_index(:rails_lti2_provider_tools, [:uuid, :shared_secret], unique: true, where: "lti_version = '1.3.0'", name: 'index_uuid_and_shared_secret_lti_1_3')
end

def self.down
remove_index('rails_lti2_provider_tools', name: 'index_uuid_and_shared_secret_lti_1_3')
remove_index('rails_lti2_provider_tools', name: 'index_uuid_lti_1_1')
remove_index('rails_lti2_provider_tools', name: 'index_uuid_shared_secret')
remove_index('rails_lti2_provider_tools', name: 'index_uuid')
remove_index('rails_lti2_provider_tools', name: 'index_id')
Expand Down
2 changes: 1 addition & 1 deletion lib/rails_lti2_provider/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module RailsLti2Provider
VERSION = '0.2.1.1'
VERSION = '0.2.1.2'
end

0 comments on commit 6ce5bbf

Please sign in to comment.