Skip to content

Latest commit

 

History

History
315 lines (214 loc) · 23.2 KB

CHANGELOG.md

File metadata and controls

315 lines (214 loc) · 23.2 KB

CHANGELOG

0.16.2 (2020-06-29)

Improvements

  • improvement: Support MariaDB's CURRENT_TIMESTAMP format (5c6d3c7)

Documentation

  • docs: Remove "--save" from npm install command (ed932c9)

0.16.1 (2020-02-13)

Improvements

0.16.0 (2019-05-09)

Breaking Changes

  • feat!: Change the interface for how keys are defined in the table schema (8cab7ce)
  • chore(ci)!: Update config and stop testing on Node 6 and 11 (56564e8)

New Features

  • feat: Add support for FULLTEXT indexes (673fad7)
  • feat: Add support for key prefix lengths (13e185d)

Improvements

  • improvement: Don't run unnecessary DROP/ADD_FOREIGN_KEY operations (687df26)
  • improvement: Improve error messages when creating ColumnDefinitions with improper arguments (fff463e)
  • chore(deps): mysql@2.17.1 (6281eab)
  • chore: Fix spelling - 'geometrical' -> 'geometry' (b88c815)

Documentation

  • docs: Use clearer language in the readme intro (ceb11ca)

0.15.0 (2018-08-12)

Breaking Changes

  • Drop support for Node 4 (e1f25a9)
  • ci: Stop testing on Node 9 (af9117f)

New Features

Bug Fixes

  • fix: Run "ADD COLUMN" operations before "MODIFY/CHANGE COLUMN" operations (5e72c04)

Documentation

  • doc: Add section for known migrations that will not work (0650b44)

0.14.0 (2018-02-15)

Breaking Changes

  • lib: Remove support for deprecated {__raw: ...} objects (739a293)

New Features

Performance

  • lib: Use === where possible (9d31c23)

Documentation

  • docs: Simplify initial example and use async-await (9987b43)
  • docs: Avoid using pronouns where possible (913d92c)

0.13.1 (2018-01-28)

Deprecations

  • lib: Log a deprecation message when a {__raw: ...} object is used (ec00429)

Documentation

  • docs: Add spatialIndexes to table of contents for Keys section (3a31e05)
  • docs: Amend the deprecation plan for {__raw: ...} objects (774b9d3)

0.13.0 (2017-11-08)

Deprecations

  • lib: Remove {__raw: ...} object documentation (1ad76d0)
    • Use mysql.raw() or pool.raw() instead to create raw values
    • This is currently a soft deprecation. In v0.13.1, mysql-plus will log a warning if you use a {__raw: ...} object with the MySQLTable#insertIfNotExists() method and support for {__raw: ...} objects will be removed completely in v0.14.0.

New Features

  • deps: mysql@2.15.0 (91ff662)
  • lib: Improve debug output formatting (a43815f)
  • PoolPlus: Add .raw() method (f0779c9)
    • This is an alias of the mysql.raw() function added in mysql@2.15.0
  • TableDefinition: Expand foreign key shorthand syntax (ccb3c53)
    • You can now specify the onDelete and onUpdate options in the shorthand like so: table.column CASCADE

Misc

  • ci: Test on Node 9 (6c44566)
  • Rename 'LICENSE' -> 'LICENSE.txt' (5b588f8)

0.12.1 (2017-08-18)

  • lib: Fix debug formatting + improve foreign key operation formatting (9f714a7)

0.12.0 (2017-08-18)

Notable Changes

  • TableDefinition: When a column changes, update its position (3836d3b)
  • lib: Replace lodash/isEmpty with a custom function (a2b68f9)
  • lib: Replace lodash/cloneDeep with a custom function for cloning keys (73651c9)
  • lib: Replace lodash/isEqual with a custom function for comparing key definitions (db32bec)
    • Lodash is no longer a dependency!
  • lib: Change how debugging logs to the console and test debugging code (c9aacb2)
  • deps: mysql@2.14.1 (adfb9b4)

0.11.1 (2017-06-26)

Bug Fixes

  • lib: Fix bug when migrating a table with foreign keys to having none (f9867da)

Misc

  • Test on Node 8

0.11.0 (2017-04-25)

Breaking Changes (that fix bugs)

  • lib: Always drop keys not created by mysql-plus during migrations (6bfa2af)
    • This fixes a bug where syncing would throw an error when attempting to drop a key not created by mysql-plus.
  • ColumnDefinitions: Define certain numeric types as synonyms (79c5acb)
    • This fixes a bug where using integer, dec, numeric, fixed, bool, or boolean would always cause the table to run unnecessary ALTER queries during migrations.
    • Feature: The bool and boolean ColType methods now return a NumericColumnDefinition instance.

New Features

  • MySQLTable: Implement an .exists() method (a01e6fb)
  • doc: Fix MySQLTable#insert() example with using only the sqlString argument (1da7a2a)

0.10.1 (2017-04-14)

Bug Fixes

  • lib: Fix bug when migrating a table with no foreign keys to having some (fa8960b)

0.10.0 (2017-04-05)

Possibly Breaking Changes

  • feat: When new columns are added during migrations, add them in the same position that they are defined in the columns object (beddf36)
    • Only breaking if you directly test the result of SHOW CREATE TABLE after migrations
  • PoolPlus: Make .defineTable() throw a TypeError (instead of Error) if name is not a string (b6489fe)
    • Mostly likely won't break anything

New Features

0.9.0 (2017-03-26)

Breaking Changes

0.8.0 (2017-03-21)

Possibly Breaking Changes

  • MySQLTable: Simplify parsing arguments to .insert() and .update() (725cdfa)
    • Should not be a breaking change if you don't pass strings or numbers as the values parameter and you don't use undefined or null to fill in unused arguments (i.e. .insert({data}, undefined, undefined, callback))

New Features

Bug Fixes

  • MySQLTable: Fix bug in .insert() where sqlString was ignored if data was an array (55cc324)

0.7.0 (2017-03-13)

Breaking Changes

  • PoolPlus: Remove deprecation error in constructor (d9c416f)

New Features

  • deps: mysql@2.13.0 (9d95934)
  • TableDefinition: Beautify CREATE TABLE statements to make debugging easier (40d93e1)
  • lib: Make debugging section separators the same length (4d92886)

Bug Fixes

  • lib: Combine all ALTER statements into a single statement before running the query (a92e330)
    • Fixes issues with migrating tables with an AUTO_INCREMENT column
  • PoolPlus: Fix bug in debug mode where the sync callback would not get called (231e7ec)

0.6.3 (2017-02-25)

New Features

  • PoolPlus: Add debugging to #sync() and fix incorrect documentation (bdbce55)
  • perf: Add fast path in diffKeys() for when either input is null (d3b66eb)

Bug Fixes

  • lib: Fix bug when altering a multi-column index and the first column in that index has a foreign key (585b7dc)

0.6.2 (2017-02-18)

Bug Fixes

  • lib: Fix foreign key bug introduced in d43235a (03374e4)
  • lib: Fix bug caused by columns with a default value (8f1e963)

0.6.1 (2017-02-11)

New Features

  • lib: Support spatial indexes (9a4a2be)
  • ColumnDefinitions: Add support for spatial data (geometry) and JSON column types (46f3034)

0.6.0 (2017-02-09)

Breaking Changes

  • lib: Require the "migrationStrategy" and "allowAlterInProduction" options to be under a "plusOptions" config property (744e492)
  • lib: Remove the deprecated Type namespace (3226971)
  • MySQLTable: Remove the deprecated tableName instance property (db99fbf)
  • MySQLTable: Remove the deprecated .insertIgnore() and .replace() methods (14aca60)
  • ColumnDefinition: Remove deprecated .defaultRaw() method (709c6f8)
  • ColumnDefinition: Remove deprecated handling of .default('CURRENT_TIMESTAMP') (ca1ace4)

New Features

  • lib: Add debug config option (baf89ee)

Bug Fixes

  • lib: Prevent error when changing columns or keys with foreign keys (d43235a)

0.5.0 (2016-12-12)

Deprecations

  • ColumnDefinition: Deprecate .defaultRaw() (ee10a0c)
  • lib: Update deprecation warnings to say things will be removed in 0.6.0 (instead of 0.5.0) (3273395)

New Features

0.4.1 (2016-12-10)

Bug Fixes

  • TableDefinition: Use defaultRaw() over default() when appropriate (4d0ed0f)
  • changelog: Add missing deprecation (5420a08)

0.4.0 (2016-12-08)

Deprecations

  • lib: Deprecate the Type namespace in favour of the new ColTypes namespace (56f56e1)
  • MySQLTable: Deprecate tableName property in favour of new name property (1916ddc)
  • MySQLTable: Deprecate the .insertIgnore() and .replace() methods (9613737)
  • ColumnDefinition: Deprecate usage of .default('CURRENT_TIMESTAMP') (4dec938)

New features and other changes

  • deps: Bump minimum mysql and lodash versions to most recent (c29c9d6)
  • MySQLTable: Add the .transacting() method (8c4905e)
  • PoolPlus: Use a transaction when syncing defined tables (2f75c04)
  • PoolPlus: Implement a .transaction() method (ee352a1)
  • MySQLTable: Make methods return a promise if the callback is omitted (f7cf915)
  • Connection: Extend with the .pquery() method (6db49f9)
  • PoolPlus: Add .pquery() method (08e7ee8)
  • ColumnDefinition: Add .oldName() method (1e78383)
  • ColumnDefinition: Add .defaultRaw() method (4dec938)
  • test: Fix COMPRESSION table option and add tests+coverage (78cb795)
  • ci: Test on Node.js v7 (5d67ba4)
  • ci: Test with MySQL 5.7 (5f42b10)
  • lib: Prevent unnecessary ALTER TABLE operation when the collation is unchanged (b5ae554)

0.3.0 (2016-05-28)

Breaking Changes

  • MySQLTable: Don't escape the first argument to .select() if it is a string (025a584)
  • MySQLTable: Fix escaping bug in .insert() and .update() (a271b9d)
    • This fix required the signature to .update() to be changed. Now the data argument is optional(ish) and can only be an object.
  • doc: Require all instances of the values argument in MySQLTable to be an Array (7cc7699)
    • Technically only a documentation change, but officially non-array values for the values argument are no longer supported and their use may cause undefined behaviour

Other Changes

  • MySQLTable: Modify .insert() to allow for bulk inserts (72c5e59)
  • doc: Remove unnecessary notes about escaping user input (9fe3a2c)
  • doc: Fix typo in MySQLTable.insertIgnore() example (e5328ff)
  • MySQLTable: Fix argument handling bug in .update() (362ed2b)

0.2.0 (2016-05-25)

  • lib: Require the m argument for varchar and varbinary (0564137)

0.1.4 (2016-05-25)

  • Prevent unnecessary charset and collation migrations (86cbd4d)

0.1.3 (2016-05-07)

  • Test on Node v6 (4c482f6)
  • Documentation improvements and miscellaneous non-code fixes

0.1.2 (2016-02-26)

  • docs: Fix asterisk formatting (58abb89)
  • docs: Fix links and formatting (95a9a13)

0.1.0 (2016-02-26)

Initial release