-
Notifications
You must be signed in to change notification settings - Fork 939
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
2.3/develop ENUM “unknown database type enum requested” #2916
Comments
Or another option would be to convert all ENUM columns to string or boolean accordingly and not use ENUM at all. |
It sounds like ENUM is the best way to go here. To the best of my knowledge, streams does not try to create any ENUM columns, but it does, as you point out, need to convert some tables that use ENUM. I guess we just need a migration for this. |
Thanks for the quick response. Ok, I will make a migration to replace all ENUM types that exist in Pyro. |
WAIT. enum is nice at times. Is this only converting enum for streams tables? Sent from my iPhone On Aug 6, 2013, at 9:29 PM, Osvaldo Brignoni notifications@github.com wrote:
|
I don't believe streams ever uses enum. |
I mean, are we adding code that will convert enum to something else when a table is converted to streams, or removing all enums from pyro? Because if its the latter: fuck that. Sent from my iPhone On Aug 6, 2013, at 10:15 PM, Adam Fairholm notifications@github.com wrote:
|
ok, I found a simpler solution. I'm not going to replace the enums. Converting a table to a stream works ok with dbforge in a migration but not a new CMS install. So for a new CMS install, I will drop the profiles table and create a new stream and add the fields. That should work. |
Streams does not, correct.
Reply to this email directly or view it on GitHub. |
Please halt all action on this until I can review the problem. Sent from my iPhone On Aug 6, 2013, at 10:35 PM, Osvaldo Brignoni notifications@github.com wrote:
|
Profiles / Users should be created in the install method of the module.
stream and add the fields. That should work.
Reply to this email directly or view it on GitHub. |
Holding on ;-) |
@RyanThompson that makes sense. |
Alright, although enum issue is there, we managed to fix the profiles install. Thanks for the help |
Sounds like this fixed? |
Yap Sent from my iPhone On Sep 12, 2013, at 6:25 PM, Phil Sturgeon notifications@github.com wrote:
|
The enum issue with hasColumn is still present. I only use it in cases where I want to avoid an error when trying to create a column that already exists. We can get around these situations by wrapping our schema logic in a try / catch block to suppress errors and allow the installer and other things to continue. |
Yeah I've done the trp/catch approach in the past. It's an issue with DBAL which hopefully some day they'll fix. |
@philsturgeon, @jerel, @adamfairholm, @RyanThompson,
This issue really needs your help. This can be a real show stopper.
I tried working around this issue. I thought I had fixed in this commit but it has no effect on the schema builder.
https://github.com/obrignoni/pyrocms/commit/31208a3f4c70e023281d4c0ad03f2fb66d471f5b
When using the MySQL driver, whenever we want to interact with a table using the schema builder we'll get this error if that table has an ENUM column. Like for example we have the "gender" ENUM column on the profiles table that we want to convert to a stream. When you use schema->hasColumn() or try to add columns using schema->table() you'll get the error.
I believe I can work around some things by adding columns with statements. But if we want to replace dbforge and rely entirely on the schema builder, we need to resolve this or talk to the vendors to see if they can provide a solution.
Here are some similar issues for reference.
I'll appreciate any help I can get.
Thanks
The text was updated successfully, but these errors were encountered: