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

Is that possible to generate unique login which is similar to the original data ? #41

Open
zengheng3 opened this issue Apr 8, 2019 · 2 comments

Comments

@zengheng3
Copy link

Hello,

I just tried this tool and it worked well on names and emails.
But for the field ‘login’, I have to use the type 'uniq_login' which generates something like UUID.
If I use the 'login' type, the generated data is similar to my original data, but SQL ('Duplicate Entry') errors appear and interrupt the execution.
In my mind, any field with the name "login" must be unique, and this is also part of its definition.
So, I would like to ask if it is possible to create a unique login similar to the original one.

@mkoszutowski
Copy link
Contributor

Hi, what do you mean "create a unique login similar to the original one"? Now, uniq_login is an md5 hash. Why? Because is almost unique, is alphanumeric, is easy to create. The last argument is the most important. If you have an easy way to generate unique, alphanumeric, similar to the original one by mysql method I would implement it. Unfortunately, now I don't have an idea better than an md5 hash.

@zengheng3
Copy link
Author

You are right, for now I haven't yet found a better solution, so I turned to you. I saw this function in some other libraries but they just store the generated data every time you call the function 'unique()', and this is not fast enough for big tables.

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