Skip to content

Releases: vapor/fluent-mysql-driver

Fix deprecation warnings for TLSConfiguration

09 Sep 02:00
2d1cbdd
Compare
Choose a tag to compare
This patch was authored and released by @gwynne.

A bit of simple cleanup for the deprecations in NIOSSL.

FluentMySQLDriver 4.0.0

29 Jul 14:55
699e164
Compare
Choose a tag to compare

Fix .references field constraint

29 Jul 01:44
7901123
Compare
Choose a tag to compare
Pre-release
This patch was authored and released by @tanner0101.

Adds a fix for a MySQL syntax quirk that caused .references constraints to be ignored (#191, fixes #170).

MySQL does not allow the REFERENCES foreign_table (column_name) syntax like Fluent's other drivers do. When it sees this syntax, it simply ignores it with no warning. The only supported method for declaring for keys is to declare them as "table level" constraints. In other words, as a separate item in the create list.

This change causes MySQL's SQLSchemaConverter to automatically translate field-level foreign key constraints (.references) to their table-level counterparts.

Add custom JSON encoder / decoder support

28 Jul 15:11
290ff55
Compare
Choose a tag to compare
This patch was authored and released by @tanner0101.

Adds support for configuring which JSON coders MySQL uses when serializing nested data to the database (#189).

// Setup custom JSON coders that use unix timestamps
let encoder = JSONEncoder()
encoder.dateEncodingStrategy = .secondsSince1970
let decoder = JSONDecoder()
decoder.dateDecodingStrategy = .secondsSince1970

// Configure MySQL database.
app.databaes.use(.mysql(
    configuration: ..., 
    encoder: MySQLDataEncoder(json: encoder), 
    decoder: MySQLDataDecoder(json: decoder)
))

Note that for dates specifically, you can use @Timestamp formats to configure formatting per field.

Support connection pool timeout configuration

23 Jul 19:35
3a4b45b
Compare
Choose a tag to compare
This patch was authored and released by @tanner0101.

Adds connectionPoolTimeout (TimeAmount) parameter to MySQL configuration methods (#187).

app.databases.use(.mysql(..., connectionPoolTimeout: .seconds(10))

FluentKit 1.0.0 GM

29 May 22:23
60ce51c
Compare
Choose a tag to compare
FluentKit 1.0.0 GM Pre-release
Pre-release
This patch was authored and released by @tanner0101.

Updates this package for compatibility with latest version of FluentKit.

Makes `isConstraintFailure` return true on duplicate constraint failure.

06 May 09:51
74d95e8
Compare
Choose a tag to compare
This patch was authored by @JetForMe and released by @gwynne.

Makes isConstraintFailure return true on duplicate constraint failure. Depends on this PR: vapor/mysql-nio#27

Date and Bool fixes

22 Apr 22:56
d65918e
Compare
Choose a tag to compare
Date and Bool fixes Pre-release
Pre-release
This patch was authored by @mcdappdev and released by @tanner0101.

Fixes some regressions around Date and Bool handling (#168).

  • Foundation.Date can now be decoded from .date (DATE) columns.

Note: Time information will be silently discarded when Foundation.Date is stored in .date column. Use .datetime (DATETIME(6)) to store date + time.

  • Fluent's .bool data type and Swift.Bool now use MySQL's BOOL (TINYINT) column type instead of BIT.

Add mysql(unixSocketDomainPath:) config option

04 Mar 21:07
2505b20
Compare
Choose a tag to compare
This patch was authored and released by @tanner0101.

Adds a configuration option for connecting to unix sockets (#164, fixes #161).

app.databases.use(.mysql(unixSocketDomainPath: ...), ...)

Release Candidate 1

28 Feb 22:53
f3b601c
Compare
Choose a tag to compare
Release Candidate 1 Pre-release
Pre-release

Updates to FluentKit Release Candidate 1.

Release candidates represent the final shift toward focusing on bug fixes and documentation. Breaking changes will only be accepted for critical issues. We expect a final release of this package shortly after Swift 5.2's release date.