Creating an ENUM field with dbforge - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Creating an ENUM field with dbforge (/showthread.php?tid=9818) |
Creating an ENUM field with dbforge - El Forum - 07-09-2008 [eluser]Bryan Zera[/eluser] I'm creating an ENUM field with dbforge: Code: $field['enum_field'] = array( Assigning the 'constraint' array key when creating database types like INT and VARCHAR put the constraint in parenthesis after the SQL type declaration, but when using ENUM as the type, it ignores the constraint. How do I set values for my ENUM fields with dbforge? Creating an ENUM field with dbforge - El Forum - 07-10-2008 [eluser]AgentPhoenix[/eluser] Well, it might have something to do with the fact that you misspelled constraint. Creating an ENUM field with dbforge - El Forum - 08-28-2012 [eluser]Sean Downey[/eluser] In case anyone else finds this the constraint should be set as Code: $field['enum_field'] = array( Creating an ENUM field with dbforge - El Forum - 07-20-2013 [eluser]goFrendiAsgard[/eluser] [quote author="Sean Downey" date="1346167503"]In case anyone else finds this the constraint should be set as Code: $field['enum_field'] = array( Thank you Sean !!! I wonder why doesn't it appeared on documentation. Creating an ENUM field with dbforge - El Forum - 01-04-2014 [eluser]kakallatt[/eluser] This is my code Code: $field['test'] = array( And I got a message: Quote:Error Number: 1064 Please help me, thank you very much. |