-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3186 from weiznich/fix/allow_mysql_tables_with_da…
…tetime_and_json_sql_types Allow mysql schemas that contain either a json or a datatime field
- Loading branch information
Showing
5 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
diesel_cli/tests/print_schema/print_schema_datetime_for_mysql/diesel.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[print_schema] | ||
file = "src/schema.rs" | ||
with_docs = true |
27 changes: 27 additions & 0 deletions
27
diesel_cli/tests/print_schema/print_schema_datetime_for_mysql/mysql/expected.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// @generated automatically by Diesel CLI. | ||
|
||
diesel::table! { | ||
/// Representation of the `users` table. | ||
/// | ||
/// (Automatically generated by Diesel.) | ||
users (id) { | ||
/// The `id` column of the `users` table. | ||
/// | ||
/// Its SQL type is `Integer`. | ||
/// | ||
/// (Automatically generated by Diesel.) | ||
id -> Integer, | ||
/// The `datetime` column of the `users` table. | ||
/// | ||
/// Its SQL type is `Datetime`. | ||
/// | ||
/// (Automatically generated by Diesel.) | ||
datetime -> Datetime, | ||
/// The `nullable_datetime` column of the `users` table. | ||
/// | ||
/// Its SQL type is `Nullable<Datetime>`. | ||
/// | ||
/// (Automatically generated by Diesel.) | ||
nullable_datetime -> Nullable<Datetime>, | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
diesel_cli/tests/print_schema/print_schema_datetime_for_mysql/mysql/schema.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CREATE TABLE users ( | ||
id INTEGER PRIMARY KEY, | ||
datetime DATETIME NOT NULL, | ||
nullable_datetime DATETIME | ||
); |