thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.78k stars 2.67k forks source link

Mysql support for ENUM #1923

Open FrodeMMeling opened 7 years ago

FrodeMMeling commented 7 years ago

Description:

ENUM is disabled and "not supported" for Mysql. Why is this? Strange since Voyager itself is using it in for instance pages.

Steps To Reproduce:

Create a table and try to add an ENUM.

DaKe-Zhang commented 7 years ago

having the same issue.

calder12 commented 7 years ago

This also is an issue when trying to add columns to Pages or Posts, it throws an error that ENUMs are not supported and won't save the table changes.

FrodeMMeling commented 7 years ago

I have a workaround for this, until its fixed/supported.

This seems to work, while waiting for fix/support

SAM-AEL commented 6 years ago

Have to Edit Database directly cause of this error.. enum works fine on database but voyager keeps saying "generic.exception : enum is not supported" on saving database.. weird cause it was working fine till today.. waiting for fix

fletch3555 commented 6 years ago

@marktopper

whyayala commented 6 years ago

I believe this is a known issue with Doctrine, not necessarily Voyager

https://github.com/laravel/framework/issues/1186

fletch3555 commented 6 years ago

@whyayala, it is, which is why we use @marktopper's package which implements the workarounds suggested on that issue. Seems like there's a new issue introduced somewhere (either Voyager or his package, or elsewhere that broke these workarounds... not sure)

jf-m commented 6 years ago

Well.. According to this line https://github.com/the-control-group/voyager/blob/b8bfb3c71632f808a2f4902cb68d308e1dbc8f42/src/Database/Types/Mysql/EnumType.php#L15

As well as this one https://github.com/the-control-group/voyager/blob/b8bfb3c71632f808a2f4902cb68d308e1dbc8f42/src/Database/Platforms/Mysql.php#L25

It pretty much seems like Voyager does not support mysql enum neither.

Regarding to the EnumType.php, it's probably because the list of possible values for the enum ($allowed) can't be found directly inside the getSQLDeclaration method.

Not supporting MySql Enum for the moment isn't a big deal actually... However, using enum types right out-of-the-box in the --with-dummy installation parameter IS a big deal!

I suggest to either support the enum, or (probably quicker), switch from enum types to int or string for the --with-dummy datas so no one gets confused. (it's very annoying to encounter a ""bug"" right at the end of the "getting started" step).

marufmax commented 6 years ago

I am having the same issue

tianhaoo commented 6 years ago

I am having the same issue tooo.

JessWallace94 commented 6 years ago

Has this been resolved yet?

MarcGaumont commented 6 years ago

Hello ? what's the fix or problem ??

brazitech commented 6 years ago

hello....has this been fixed yet....

guoxiangke commented 6 years ago

having the same issue.

MaraScott commented 6 years ago

if it helps https://www.brandonsavage.net/why-you-should-replace-enum-with-something-else/

Reflow1319 commented 5 years ago

So it has been a year and this had yet to be fixed, is there something I am missing that would make this hard to fix other than just not using the dummy data?

anandmainali commented 5 years ago

Same issue here.. Why the issue is not fixed yet??

malesandro commented 5 years ago

Hi! I'm also having this issue. Is there any fix being planned?

brazitech commented 5 years ago

no its not fixed and it seems they do not care to even respond......is is starting to look like Apple took over....very arrogant if you ask me!!!!! i know its free...but at least answer......

iwasherefirst2 commented 5 years ago

@brazitech feel free to create a pull request

brazitech commented 5 years ago

their you go...like i said...ARROGENT !!!!!!!

fletch3555 commented 5 years ago

@iwasherefirst2 is not one of the maintainers, and certainly was not being arrogant, so your point was missed by a long shot.

@brazitech, please consider this an official warning about your tone. We don't appreciate being berated when we do this work for free and provide it to you for free. The concept of open-source means that the larger community can support it and build upon it, which includes you. So his comment was simply suggesting you do so instead of complaining that we're not doing everything you need at the time you need it (emphasis on the multiple "you"s in that statement).

Mahdi-Sahib commented 3 years ago

Hi! I'm also having this issue. Is there any fix being planned?