mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00:00
* Initial sec * Update PII fields * FIX add tests * FIX safely read plaintext data on rake backfill * Update user.rb * FIX tests * encryption_ready? block * Test conditional to encryption on --------- Signed-off-by: Juan José Mata <juanjo.mata@gmail.com> Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
16 lines
582 B
Ruby
16 lines
582 B
Ruby
class AddHashColumnsForSecurity < ActiveRecord::Migration[7.2]
|
|
def change
|
|
# Invitations - for token hashing
|
|
add_column :invitations, :token_digest, :string
|
|
add_index :invitations, :token_digest, unique: true, where: "token_digest IS NOT NULL"
|
|
|
|
# InviteCodes - for token hashing
|
|
add_column :invite_codes, :token_digest, :string
|
|
add_index :invite_codes, :token_digest, unique: true, where: "token_digest IS NOT NULL"
|
|
|
|
# Sessions - for IP hashing
|
|
add_column :sessions, :ip_address_digest, :string
|
|
add_index :sessions, :ip_address_digest
|
|
end
|
|
end
|