allow for MySQL COMMENT field-attribute in Model attribute definition#523
allow for MySQL COMMENT field-attribute in Model attribute definition#523janmeier merged 3 commits intosequelize:masterfrom iamjochem:feature/field-sql-comment-attribute
Conversation
|
bit of a fail (and yes I did read to be careful to not commit that config file :-/) - not that my local mysql password is any big secret, I only set it to something to make sure my local dev setup runs with a pwd set just like other env's. It might be a good idea to be able to define an override config file for local testing (one that would be picked up in preference of the repo default if it exists AND is defined in .gitignore)? Additionally the MySQL tests completely ignore the host and port settings ... which is not very handy if your local MySQL setup runs via a sockets rather than TCP. |
|
Something looks weird here. The only diff is the test file, where is the actual code for this? Travis does not report any errors, but if you look at the actual test run (https://travis-ci.org/sequelize/sequelize/jobs/6162367) your test fails - which makes sense since there is no code to support that feature ;) I'll check up on whether this is just a single error in travis / jasmine or if travis doesnt actually fails when a jasmine test fails |
|
Update on the testing issue: @iamjochem Is this a feature request that you just added tests for, or do you have the actual code somewhere :)? Also, could you please move the tests to buster (the /spec folder) |
|
@janmeier - er yeah, there should have been some code to go with the test, now included! ... it's only for MySQL because:
with regard to 'moving' the tests to buster ... no, I have no idea what the buster syntax is and there are no tests currently for the mysql connector's dao-factory (or any other dao-factory for that matter) that I can use as a reference for rewriting the jasmine test ... sorry. If you can help point me in the right direction in this regard I might be persuaded to have a go at rewriting the test (to be honest though given the number of tests that need to be ported to buster it seems a better idea to tackle that in a seperate PR). |
|
Thanks a bunch, I merged and added the same functionality for PG ;-) You are right about the tests, no query generator tests in buster (yet!) |
|
cool! - glad that not having the buster tests in this case wasn't a deal breaker. |
make's it possible (when using MySQL) to define a comment property in a Model attribute's definition such that the DB Schema generated by calling the
sync()method will include aCOMMENT.e.g.:
which would result in [roughly] the following schema SQL: