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

[Generator] Model command fails with enum field type #29

Open
claudiopro opened this issue Mar 17, 2023 · 0 comments
Open

[Generator] Model command fails with enum field type #29

claudiopro opened this issue Mar 17, 2023 · 0 comments
Labels

Comments

@claudiopro
Copy link
Member

claudiopro commented Mar 17, 2023

Steps to reproduce

→ DB_DEBUG=1 vendor/bin/emerails_generate model -f "name:varchar(128),surname:varchar(128),birthday:date,gender:enum('male','female','nonbinary')" person

Output

                                   _ __
   ___  ____ ___  ___  _________ _(_) /____
  / _ \/ __ `__ \/ _ \/ ___/ __ `/ / / ___/
 /  __/ / / / / /  __/ /  / /_/ / / (__  )
 \___/_/ /_/ /_/\___/_/   \__,_/_/_/____/

(c) Claudio Procida 2008-2023

EmeRails Generator Utility v1.0

        creating models/person.php
<pre class="db-debug">SHOW TABLES LIKE 'people'</pre>
<pre class="db-debug">CREATE TABLE `people` (
`id` int(11)
,`name` varchar(128)
,`surname` varchar(128)
,`birthday` date
,`gender` enum('male'
,`'female'` 
,`'nonbinary')` 
);</pre>
☠ Error (CREATE TABLE `people` (
`id` int(11)
,`name` varchar(128)
,`surname` varchar(128)
,`birthday` date
,`gender` enum('male'
,`'female'` 
,`'nonbinary')` 
);): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`'female'` 
,`'nonbinary')` 
)' at line 7

@claudiopro claudiopro added the bug label Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant