- improvement: Support MariaDB's CURRENT_TIMESTAMP format (
5c6d3c7
)
- docs: Remove "--save" from npm install command (
ed932c9
)
- chore: Fix typo in CHANGELOG (
a821775
) - refactor: Use
Array.isArray()
instead ofinstanceof Array
(4e73a2e
) - chore(ci): Remove Node 8 and add Node 13 (
0e7511a
) - chore(deps):
mysql@2.18.1
(1f5571d
)
- feat!: Change the interface for how keys are defined in the table schema (
8cab7ce
)- Check out the new documentation on how to define table keys
- chore(ci)!: Update config and stop testing on Node 6 and 11 (
56564e8
)
- 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
)
- docs: Use clearer language in the readme intro (
ceb11ca
)
- fix: Run "ADD COLUMN" operations before "MODIFY/CHANGE COLUMN" operations (
5e72c04
)
- doc: Add section for known migrations that will not work (
0650b44
)
- lib: Remove support for deprecated
{__raw: ...}
objects (739a293
)
- PoolPlus: Add Promise support to
pool.sync()
(0704b40
)
- lib: Use
===
where possible (9d31c23
)
- docs: Simplify initial example and use
async-await
(9987b43
) - docs: Avoid using pronouns where possible (
913d92c
)
- lib: Log a deprecation message when a
{__raw: ...}
object is used (ec00429
)
- docs: Add spatialIndexes to table of contents for Keys section (
3a31e05
) - docs: Amend the deprecation plan for
{__raw: ...}
objects (774b9d3
)
- lib: Remove
{__raw: ...}
object documentation (1ad76d0
)- Use
mysql.raw()
orpool.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 theMySQLTable#insertIfNotExists()
method and support for{__raw: ...}
objects will be removed completely inv0.14.0
.
- Use
- 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 inmysql@2.15.0
- This is an alias of the
- TableDefinition: Expand foreign key shorthand syntax (
ccb3c53
)- You can now specify the
onDelete
andonUpdate
options in the shorthand like so:table.column CASCADE
- You can now specify the
- lib: Fix debug formatting + improve foreign key operation formatting (
9f714a7
)
- 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
)
- lib: Fix bug when migrating a table with foreign keys to having none (
f9867da
)
- Test on Node 8
- 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
.
- This fixes a bug where syncing would throw an error when attempting to drop a key not created by
- ColumnDefinitions: Define certain numeric types as synonyms (
79c5acb
)- This fixes a bug where using
integer
,dec
,numeric
,fixed
,bool
, orboolean
would always cause the table to run unnecessaryALTER
queries during migrations. - Feature: The
bool
andboolean
ColType methods now return aNumericColumnDefinition
instance.
- This fixes a bug where using
- MySQLTable: Implement an
.exists()
method (a01e6fb
) - doc: Fix
MySQLTable#insert()
example with using only thesqlString
argument (1da7a2a
)
- lib: Fix bug when migrating a table with no foreign keys to having some (
fa8960b
)
- 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
- Only breaking if you directly test the result of
- PoolPlus: Make
.defineTable()
throw aTypeError
(instead ofError
) if name is not a string (b6489fe
)- Mostly likely won't break anything
- PoolPlus: Add
.basicTable()
method that just creates aMySQLTable
instance (2ca6e43
)
- ColumnDefinition: Make timestamp columns NULL by default (
dfcd030
)- See the TimestampColumnDefinition documentation for details
- 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 useundefined
ornull
to fill in unused arguments (i.e..insert({data}, undefined, undefined, callback)
)
- Should not be a breaking change if you don't pass strings or numbers as the
- MySQLTable: Implement new
.insertIfNotExists()
method (1791688
) - MySQLTable: Allow
.insert()
to accept a string as the first parameter (f4c9d92
) - docs: Show generated SQL in MySQLTable query examples (
785d853
)
- PoolPlus: Remove deprecation error in constructor (
d9c416f
)
- 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
)
- 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
)
- PoolPlus: Add debugging to #sync() and fix incorrect documentation (
bdbce55
) - perf: Add fast path in diffKeys() for when either input is null (
d3b66eb
)
- lib: Fix bug when altering a multi-column index and the first column in that index has a foreign key (
585b7dc
)
- lib: Fix foreign key bug introduced in
d43235a
(03374e4
) - lib: Fix bug caused by columns with a default value (
8f1e963
)
- lib: Support spatial indexes (
9a4a2be
) - ColumnDefinitions: Add support for spatial data (geometry) and JSON column types (
46f3034
)
- 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
)
- lib: Add
debug
config option (baf89ee
)
- lib: Prevent error when changing columns or keys with foreign keys (
d43235a
)
- ColumnDefinition: Deprecate
.defaultRaw()
(ee10a0c
) - lib: Update deprecation warnings to say things will be removed in 0.6.0 (instead of 0.5.0) (
3273395
)
- UpdatableTimeColumnDefinition: Add
.defaultCurrentTimestamp()
method (949d72f
)
- TableDefinition: Use
defaultRaw()
overdefault()
when appropriate (4d0ed0f
) - changelog: Add missing deprecation (
5420a08
)
- lib: Deprecate the
Type
namespace in favour of the newColTypes
namespace (56f56e1
) - MySQLTable: Deprecate
tableName
property in favour of newname
property (1916ddc
) - MySQLTable: Deprecate the
.insertIgnore()
and.replace()
methods (9613737
) - ColumnDefinition: Deprecate usage of
.default('CURRENT_TIMESTAMP')
(4dec938
)- Use the
.defaultRaw()
method instead
- Use the
- 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
)
- 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 thedata
argument is optional(ish) and can only be an object.
- This fix required the signature to
- doc: Require all instances of the
values
argument inMySQLTable
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
- Technically only a documentation change, but officially non-array values for the
- 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
)
- lib: Require the m argument for varchar and varbinary (
0564137
)
- Prevent unnecessary charset and collation migrations (
86cbd4d
)
- Test on Node v6 (
4c482f6
) - Documentation improvements and miscellaneous non-code fixes
Initial release