We were using bluebird as a Promise implementation for Node.js versions
that did not provide a native Promise (i.e. Node.js 0.10 & 0.12). There
is no need for that anymore, since Node.js have been shipping native
Promise implementation for years by now.
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
* Adding ability to use MySQL DEFAULT clause
Adding mysql.default option and documentation on special case for date.
Adding unit tests for Default Clause.
* Handle unsupported types, don't stringify numbers
* Adding note about unsupported column types.
* Update readme.
Since using REPLACE or INSERT...ON DUPLICATE KEY
statements both give us affected rows of 1 for a
new row or a row which got updated with the same
values, we make isNewInstance undefined on after
save hook for save, replaceOrCreate, and
updateOrCreate methods. Also, disable juggler
tests for that functionality.
When converting null values
to database column values,
return null if column is
nullable, otherwise try
to cast it to the property
type, and if not, return
'null'.
MySQL expects reverse order of latitude and longitude
from the way we use it in LoopBack, so switch the order
when saving and loading Point spatial type we use for
Point/GeoPoint.
* fix compare of foreign keys for autoupdate
use mysql table name in case it is not equal model name
* fix column name lookup for fk definition
* fix ADD CONSTRAINT for multiple fk
if more the one foreign key added ADD CONSTRAINT
must be separated with comma but not with space as applySqlChanges do.
* fix duplicate foreign key creation on autoupdate
* fix entity name selection
* change join to toString as requested
* fix removing dropped keys
* fix linter issues
* add test case with columnName in foreign key
and isActual check after autoupdate
* uncommit accitenally commited test case
* refactor date, timestamp, datetime data-type
* reverse datatypes.test.js changes
* checking property.mysql.dataType
along with property.dataType for timestamp fields
* Fix PR linter
* moved test cases all under one test file
remove unnecessary test cases, unify setup procedures
* Fix sql mode before migration
Set sql mode to allow zero's on timestamp
Clean up code
* remove test cases with strings and DATE field type
* code cleanup as requested
* add accidentally deleted assert.ok(found)
* fix timeZone to timezone case in README.md
* Update readme with date type info