Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organization name is being encrypted on creation. #47

Open
DCox2016 opened this issue Jun 17, 2023 · 3 comments
Open

Organization name is being encrypted on creation. #47

DCox2016 opened this issue Jun 17, 2023 · 3 comments
Assignees

Comments

@DCox2016
Copy link

image

The organization name is being encrypted and causing a name too long error

@DCox2016
Copy link
Author

I commented out the protected $encryptable name and I now get this
image
Which is the phone number and I can see why this is encrypted because it is personal data, so I think we just need to add migrations to have the database columns accept encrypted strings. Let me know if I have the right approach

@andrewdrake
Copy link
Contributor

This is a problem when migrations are run before the encrypt db fields config is set as true.

There is a migration that checks if field encrption is true, and then alters the data types on these fields to allow for the longer strings.

eg organisation name will be varchar(1000) rather than varchar(255)

I will need to think about how to manage this, prompting a database update required if the setting is changed post running migrations will be a solution

@DCox2016
Copy link
Author

So I created 4 migrations
Each updates the column type from string to text.
crm_organisations - name
crm_phones - number
crm_emails - address
crm_address - line1, line2, line3, city, state, code, country

This allowed me to create a organization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants