Skip to content

Conversation

tanthammar
Copy link

fixes #422
Don't know if you prefer a switch statement or elseif

fixes #422 
Don't know if you prefer a switch statement or elseif
@jasonmccreary
Copy link
Collaborator

if/else is fine.

Can you back this up with a test? There should be an example fixture already you can add the proper syntax to do demonstrate is generating your new DocBlocks.

@tanthammar
Copy link
Author

tanthammar commented Jan 29, 2021

@jasonmccreary

I don't know the "best practice" for naming the id column on the uuidMorphs column type.
I've set it to $column->name() . '_id', should it be $column->name() . '_uuid'?

I'll add a test.

@jasonmccreary
Copy link
Collaborator

@tanthammar I'm not sure what you're asking. Go ahead with the test and I'll review/tweak whatever you send.

@ghostwriter
Copy link
Contributor

@tanthammar The uuidMorphs() method adds a {column}_id CHAR(36) equivalent column and a {column}_type VARCHAR equivalent column.

There is also the nullableUuidMorphs() similar to the uuidMorphs method; however, the columns that are created will be "nullable". (if you'd like to attempt to add this as well)

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.

Morphs php annotation incorrect
3 participants