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
Setting default collation in XML schema #573
Comments
Perhaps works for Charset but how about Collation? There are many different UTF-8 character sets in MySQL (http://dev.mysql.com/doc/refman/5.0/en/charset-unicode-sets.html) so if it does work what of those it will use? Need to test that out if it works correctly. |
Nah, that runtime configuration is only the charset for the current connection. Your vendor stuff is something different. I give a +1 for this (trivial) change, so we can define vendor stuff directly under |
I had the same issue in Propel1 so I would love to get this fixed here. I suggest keeping it simple and just allow the vendor-element to be defined on the database-level instead of adding new attributes. Like this <database>
<table> ... </table>
<!-- global vendor -->
<vendor>
<parameter name="Charset" value="utf8" />
</vendor>
</database> |
Yes, feel free to send pull requests. 👍 |
To my surprise it seems that this is already supported by propel. Look here https://github.com/propelorm/Propel2/blob/master/src/Propel/Generator/Builder/Util/SchemaReader.php#L213 And later in the MysqlPlatform the database vendor info's get merged with the table vendor infos (https://github.com/propelorm/Propel2/blob/master/src/Propel/Generator/Platform/MysqlPlatform.php#L273) |
Maybe we should add some documentation regarding this default vendor element? |
@mpscholten yes. |
This should fix missing documentation for propelorm/Propel2#573
This should fix missing documentation for propelorm/Propel2#573 Fixed line length Added missing new line
@drodil your issue should be solved now. Checkout the documentation to set the default collation. |
@mpscholten great, thanks! |
It would be awesome to set up the database collation (MySQL) in the schema XML database tag instead for each table separately. I have about 50 datatables in schema.xml and now I have to add the following lines for every table definition to get the collation to use UTF-8:
It would be very nice to be able to set the database default collation and charset in database tag for example:
The text was updated successfully, but these errors were encountered: