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

Change UUID database column type to CHAR #15

Merged
merged 1 commit into from
Aug 6, 2016

Conversation

moleculezz
Copy link
Contributor

CHAR has some performance advantages over VARCHAR. Also Laravel uses CHAR(36) for it's new uuid type introduced in v5.2.

If you later decide to upgrade the migration schema to Laravel's uuid type, the underlying database schema wouldn't change.

@nWidart
Copy link
Owner

nWidart commented Aug 6, 2016

Interesting I didn't know about that char type. You state it was introduced in l5.2, meaning it won't work in 5.1 ?

Looking at the commit, it looks like it's a ->uuid() type, which internally uses char, so I'm assuming that ->char() type was here before.

@moleculezz
Copy link
Contributor Author

Yes CHAR has been there since forever. The new uuid just creates a char(36).

@nWidart
Copy link
Owner

nWidart commented Aug 6, 2016

Awesome, thanks.

@nWidart nWidart merged commit f5c9fac into nWidart:master Aug 6, 2016
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

Successfully merging this pull request may close these issues.

2 participants