Commit Graph

484 Commits

Author SHA1 Message Date
siddhipai 3b2854045a Merge pull request #240 from strongloop/replicate-issue-template
Replicate issue_template from loopback repo
2017-03-28 14:53:41 -07:00
Siddhi Pai e1502baf31 Replicate new issue_template from loopback 2017-03-22 17:09:40 -04:00
Siddhi Pai 0c677e59e3 Replicate issue_template from loopback repo 2017-03-22 17:09:40 -04:00
Sakib Hasan f550caae0e Merge pull request #227 from juanramb/fix-blob
Fix wrong values in mysql after saving buffer fields
2017-03-21 07:08:44 -04:00
juanra a8e22c5bff fix linting problems 2017-03-21 10:45:24 +01:00
Sakib Hasan 2fc14154c7 Merge pull request #252 from strongloop/fix/refactor-fns
Extract functions to base connector
2017-03-20 11:36:18 -04:00
ssh24 dc1e0d8050 Extract functions to base connector
move getAddModifyColumns and getDropColumns to base
2017-03-20 10:34:47 -04:00
Sakib Hasan e81de01aa6 Merge pull request #251 from strongloop/refactor-alter-table
Refactor alter table
2017-03-17 17:42:30 -04:00
ssh24 a02047b643 Refactor alter table
Include fk with autoupdate/migrate

Some tests are failing due to timeout, looking into it
should check actuality of dataSource fails, looking into it

Fix actuality of ds test

Fix autoupdate test timeout

Fix requested changes

Fix to checkOnly for isActual
2017-03-17 17:21:10 -04:00
Ctibor Laky 04665277b7 Typo on README (#236)
* typo
2017-03-10 06:50:59 -05:00
Christiaan Westerbeek b67b57970f Return if column is generated or not (#198)
* Return if column is generated or not

Related to
https://github.com/strongloop/loopback-datasource-juggler/issues/899

* add pk for testgen table

* Fixe the double quotes around generated

as requested by @loay

* Fix commit linter

Block must not be padded by blank lines padded-blocks

* Code fixes to follow guide

* Should fix the tests failing

Test failing on the tableName (incorrect case)
2017-03-08 18:56:27 -05:00
Loay fa0e5b46c6 Merge pull request #249 from strongloop/feature/upgrade-to-connector-4.x
Upgrade to loopback-connector@4.x
2017-03-06 19:22:14 -05:00
Loay 44bc9a99cb Upgrade to loopback-connector@4.x 2017-03-06 19:09:42 -05:00
Sadman Sakib Hasan 9f1affdad3 Merge pull request #243 from strongloop/refactor-mysql-migration
Refactor mysql migration
2017-03-02 13:18:21 -08:00
ssh24 ab644d9fea Refactor migration methods
Fix timeout error on tests

Signed-off-by: Sakib Hasan <sshasan10@hotmail.com>

add showFields and showIndexes functions

Extract getTableStatus

Extract columnDataType to base connector
2017-03-02 15:49:30 -05:00
Loay 030f8f9dc1 Merge pull request #241 from strongloop/refactor-discovery
Refactor Discovery Methods
2017-02-28 16:18:23 -05:00
Loay 820bf03400 Refactor Discovery Methods 2017-02-28 16:06:51 -05:00
Sadman Sakib Hasan 692c07bd51 Merge pull request #193 from matthewdickinson/foreign_key_migration
Foreign key migration
2017-02-20 16:19:00 -08:00
Matthew Dickinson 6848b72e22 Remove old TODO and commented out code 2017-02-18 21:10:04 -05:00
Matthew Dickinson 5ba6687c7c Fix autoupdate to create foreign keys after tables
Updated the autoupdate function so that it collects foreign key
statements and runs them once all tables have been updated.
This prevents foreign keys being created before referenced tables.
2017-02-17 11:25:19 -05:00
Matthew Dickinson 24c6b77a6f Add logging for errors encountered in discovery 2017-02-17 11:25:19 -05:00
Matthew Dickinson 0b04d461e4 Update signature for alterTable
Since alterTable is semi-public, the method now checks the arugments to
make sure that it still supports the old signature that doesn't include
actualFks
2017-02-17 11:25:19 -05:00
Matthew Dickinson d461d07f34 Limit foreign key creation current connector
Updated fk generation to make sure that it doesn't try to create
foreign keys linking to another DB/connector
2017-02-17 11:25:19 -05:00
Matthew Dickinson 4d20fa7746 Fix linting error 2017-02-17 11:25:19 -05:00
Matthew Dickinson 04287f6a77 Added test to validate foreign key handling 2017-02-17 11:25:19 -05:00
Matthew Dickinson 940032f4dd Update foreign key creation table name handling 2017-02-17 11:25:19 -05:00
Matthew Dickinson 782959cf20 Update alterTable to actually drop constraints 2017-02-17 11:25:19 -05:00
Matthew Dickinson 1324333ffd Add rough handling for automatic foreign keys
This handles basic creating/dropping of FKs based on model relations
2017-02-17 11:25:19 -05:00
ivy ho 39d67fa1f9 remove line not needed (#237)
remove the line that does not look good in github but okay for loopack.io
confirming with rand that that can be removed
2017-02-09 09:37:45 -08:00
Loay d27ab084a6 Merge pull request #235 from strongloop/lc-version3
Update LB-connector version
2017-01-26 11:13:04 -05:00
Loay da0807faf6 Update LB-connector version 2017-01-26 10:48:36 -05:00
Miroslav Bajtoš 0fe22653e3 3.0.0
* Follow mysql recommendations for handling booleans (Carl Fürstenberg)
 * Fix readme glitch (#231) (Rand McKinney)
 * Update readme w info from docs (#229) (Rand McKinney)
 * Fix expected column name when autoupdate (muhammad hasan)
 * Update paid support URL (Siddhi Pai)
 * Fix CI Failures (Loay Gewily)
 * Drop support for Node v0.10 and v0.12 (Siddhi Pai)
 * Start the development of the next major version (Siddhi Pai)
 * Update README with correct doc links, etc (Amir Jafarian)
2017-01-13 15:46:04 +01:00
Simon Ho 6ac3a56062 Merge pull request #232 from strongloop/azatoth-change_discovery_boolean
Follow mysql recommendations for handling booleans
2017-01-11 21:00:31 -08:00
Carl Fürstenberg 5383c4c0ff Follow mysql recommendations for handling booleans
Per http://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html
`BOOL` and `BOOLEAN` is alias for `TINYINT(1)` thus we should make
sure discover can handle as such.

Introducing three flags:

* treatCHAR1AsString
  default false - treats CHAR(1) as a String instead of a Boolean
* treatBIT1AsBit
  default true - treats BIT(1) as a Boolean instead of a Binary
* treatTINYINT1AsTinyInt
  default true - treats TINYINT(1) as a Boolean instead of a Number

The default handling for CHAR(1) is legacy backward compability due to
custom to use a CHAR(1) to store 'Y', 'N', '0', '1', etc...
2017-01-11 19:44:50 -08:00
Rand McKinney 160e8dae72 Fix readme glitch (#231)
* Update README.md

* Update README.md
2017-01-11 16:06:55 -08:00
Rand McKinney 9fab8ba795 Update readme w info from docs (#229)
* Update readme w info from docs

* Update README.md

* Update README.md

Fix problems, clarify.
2017-01-10 16:13:45 -08:00
Janny 529eebbc60 Merge pull request #226 from hasanlussa/fix/column-name-in-discovery
Fix expected column name when autoupdate
2016-12-12 10:15:08 -05:00
muhammad hasan 0f1b14b158 Fix expected column name when autoupdate
Fix mysql column name being ignored on dataType change or new column
being added
Fix mysql column name ignored if index changed

Add column name case on autoupdate test

Fix test case scheme error

Fix describe test
2016-12-12 10:06:18 -05:00
siddhipai 333fa21024 Merge pull request #219 from strongloop/update-support-URL
Replicate .github from loopback repo
2016-12-09 09:14:36 -08:00
Siddhi Pai 3eab2cb16a Update paid support URL 2016-12-09 09:01:23 -08:00
Loay 37bb679f6e Merge pull request #211 from strongloop/Fix/CI
Fix CI Failures
2016-12-08 00:04:17 -05:00
Loay Gewily fce2207da3 Fix CI Failures 2016-12-07 23:53:46 -05:00
Simon Ho 6a3fc7f2aa Merge pull request #215 from strongloop/next-major-drop-old-node
Start 3.x + drop support for Node v0.10/v0.12
2016-11-21 13:09:46 -08:00
Siddhi Pai 0acd9ef15a Drop support for Node v0.10 and v0.12 2016-11-19 01:02:44 -08:00
Siddhi Pai 1a6e51a4a6 Start the development of the next major version 2016-11-19 00:55:50 -08:00
Rand McKinney 46d5e957a9 Merge pull request #212 from strongloop/edit_readme
Update README with correct doc links, etc
2016-10-31 15:25:14 -07:00
Amir Jafarian 499a1c30f8 Update README with correct doc links, etc 2016-10-31 17:02:14 -04:00
Miroslav Bajtoš 746ee48601 2.4.0
* Add connectorCapabilities global object (#201) (Nicholas Duffy)
 * Remove unused prefix for test env vars (#203) (Simon Ho)
 * Update translation files - round#2 (#199) (Candy)
 * Add CI fixes (#197) (Loay)
 * Add translated files (gunjpan)
 * Update deps to loopback 3.0.0 RC (Miroslav Bajtoš)
 * Remove Makefile in favour of NPM test scripts (Simon Ho)
 * Fixing lint errors (Ron Lloyd)
 * Autoupdate mysql.columnName bug fix (Ron Lloyd)
 * Tests for autoupdate mysql.columnName bug fix (Ron Lloyd)
 * Use juggler@3 for running the tests (Miroslav Bajtoš)
 * Explictly set forceId:false in test model (Miroslav Bajtoš)
 * Fix pretest and init test configs (Simon Ho)
 * Fix to configure model index in keys field (deepakrkris)
 * Update eslint infrastructure (Loay)
 * test: use dump of original test DB as seed (Ryan Graham)
 * test: skip cardinality, update sub_part (Ryan Graham)
 * test: accept alternate test db credentials (Ryan Graham)
 * test: use should for easier debugging (Ryan Graham)
 * test: account for mysql version differences (Ryan Graham)
 * test: match case with example/table.sql (Ryan Graham)
 * test: separate assertions from test flow control (Ryan Graham)
 * test: update tests to use example DB (Ryan Graham)
 * test: seed test DB with example (Ryan Graham)
 * test: fix undefined password (Ryan Graham)
 * Add special handling of zero date/time entries (Carl Fürstenberg)
 * Add globalization (Candy)
 * Update URLs in CONTRIBUTING.md (#176) (Ryan Graham)
2016-10-17 13:20:42 +02:00
Nicholas Duffy 18cffb98ab Add connectorCapabilities global object (#201) 2016-10-11 23:13:20 -07:00
Simon Ho 8ed53f6cfa Remove unused prefix for test env vars (#203)
* TEST_ prefix is not used by CI anymore and there for serve no purpose

* Part of overall goal to standardize env var injection to
  MODULE_VARNAME (ie. MYSQL_HOST for example) convention
2016-10-07 17:36:43 -07:00