Commit Graph

25 Commits

Author SHA1 Message Date
Loay Gewily fce2207da3 Fix CI Failures 2016-12-07 23:53:46 -05:00
Loay 6100a62461 Add CI fixes (#197) 2016-09-28 13:32:38 -07:00
Ron Lloyd 980151d0a8 Fixing lint errors 2016-09-13 22:21:11 -06:00
Raymond Feng 5fec12a00c Merge pull request #179 from azatoth/zero_datetime
Add special handling of zero date/time entries
2016-08-11 09:03:14 -07:00
Loay 9c9b61e7dc Update eslint infrastructure 2016-08-10 20:04:26 -04:00
Ryan Graham a798377f98
test: skip cardinality, update sub_part
Index cardinality is actually a metric that is based on MySQL analyzing
the table contents, so its value here has more to do with whether the
tests are running against a new table, an old table, or whether it has
any data in it.

The Sub_part field is similarly unimportant for the purposes of these
tests since it refers to indexing internals based on data type and
partial indexing.

See: https://dev.mysql.com/doc/refman/5.5/en/show-index.html
2016-08-09 19:14:51 -07:00
Ryan Graham b965a31f77
test: account for mysql version differences
Some of the tests are based on default behaviour of MySQL 5.5 or older
which is not the same as 5.7 out of the box.
2016-08-09 11:25:38 -07:00
Ryan Graham 9ad29ddbaa
test: update tests to use example DB
Use should.match() so we can use case-insensitve regexp for properties
that change case depending on the server being tested against.
2016-08-09 11:25:38 -07:00
Carl Fürstenberg 1ee79768f2 Add special handling of zero date/time entries
Per MySQL docs
(http://dev.mysql.com/doc/refman/5.7/en/date-and-time-types.html):

  "MySQL permits you to store a “zero” value of '0000-00-00' as a
  “dummy date.” This is in some cases more convenient than using NULL
  values, and uses less data and index space. To disallow '0000-00-00',
  enable the NO_ZERO_DATE mode.

  “Zero” date or time values used through Connector/ODBC are converted
  automatically to NULL because ODBC cannot handle such values."

As we are not using Connector/ODBC we need to handle this ourself.
2016-07-29 14:59:24 +02:00
Ryan Graham 340a4eb0f6
insert/update copyright notices 2016-05-03 16:52:03 -07:00
Raymond Feng be54c1a407 Refactor the code to use base SqlConnector 2015-05-13 10:17:15 -07:00
Raymond Feng a82fc3f9d2 Create 'NOT NULL' constraint for required or id properties 2014-12-03 14:10:21 -08:00
Raymond Feng 04c10fdf03 Enhance error reporting for automigrate/autoupdate 2014-09-11 12:23:32 -07:00
Raymond Feng abaabff01a Fix the default length for strings to avoid row size overflow 2014-07-08 11:23:45 -07:00
Raymond Feng b9e4b64848 Fix the varchar length 2014-05-29 15:45:25 -07:00
Raymond Feng fa003bb267 Fix the table generation for string ids 2014-04-07 22:16:26 -07:00
Raymond Feng e54aa56cee Reformat code 2014-02-12 16:57:06 -08:00
Raymond Feng fb2624bc6c Append error to the message 2013-11-06 14:51:20 -08:00
Raymond Feng 9daf9ef91c Rename 'loopback-data' to 'loopback-datasource-juggler' 2013-07-30 14:21:10 -07:00
Raymond Feng 382f99b9c6 Rename schema/adapter to be dataSource/connector 2013-07-23 12:47:02 -07:00
Raymond Feng 9674a0308e Bring up the test cases 2013-07-21 17:27:54 -07:00
dgsan bcee504d77 Proper tests and support for connection collation/charset. Added semicov as a dev dependency because of how tests are run. 2013-06-13 09:34:31 -07:00
dgsan 193e5d6463 Adds test that validate the basic behavior of numeric and date columns using the added recently added dataTypes. 2013-06-06 10:09:39 -07:00
dgsan 93e4898312 Update migration.test.js
Global leak error triggered because of missing var in line ported from coffeescript.
2013-06-04 15:58:17 -06:00
dgsan 8b7ac18cc3 Support for local MySQL dataTypes via the dataType model field option.
Support for setting collation/charset at the schema level.

Porting of non-running migration test to new test running layout.

Resolves issue #19. Resolves issue #28. Resolves issue #17.

Should allow for changing the types for particular columns (Int, SmallInt, BigInt, Text, Char, Float, etc.).
This seems to work with the current migration test, however use of floats and such in model instances has not been heavily tested.

Likewise, in porting migration the full suite of index migration tests has yet to be ported.
Likewise, issue with dropping columns from a model persists and seems related to `defineProperty` in JDB core choking when used to try and undefine.
2013-06-04 14:34:23 -07:00