Skip to content

Commit 7f65389

Browse files
authored
Merge pull request #29 from weiznich/fix/26
Fix #26
2 parents 9221da1 + 4a1a360 commit 7f65389

File tree

4 files changed

+163
-74
lines changed

4 files changed

+163
-74
lines changed

Cargo.lock

Lines changed: 16 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,24 @@ diesel = { version = "2.0.0", default-features = false, features = ["i-implement
1717
async-trait = "0.1.51"
1818
futures = "0.3.17"
1919
tokio-postgres = { version = "0.7.2", optional = true}
20-
tokio = { version = "1.12.0", features = ["rt"], optional = true}
21-
mysql_async = { version = "0.29.0", optional = true}
22-
mysql_common = {version = "0.28.0", optional = true}
20+
tokio = { version = "1", optional = true}
21+
mysql_async = { version = "0.30.0", optional = true}
22+
mysql_common = {version = "0.29.0", optional = true}
2323

2424
bb8 = {version = "0.8", optional = true}
2525
deadpool = {version = "0.9", optional = true}
2626
mobc = {version = "0.7", optional = true}
2727

2828
[dev-dependencies]
29-
tokio = {version = "1.12.0", features = ["rt", "macros"]}
29+
tokio = {version = "1.12.0", features = ["rt", "macros", "rt-multi-thread"]}
3030
cfg-if = "1"
3131
chrono = "0.4"
32-
diesel = { version = "2.0.0-rc.1", default-features = false, features = ["chrono"]}
32+
diesel = { version = "2.0.0", default-features = false, features = ["chrono"]}
3333

3434
[features]
3535
default = []
3636
mysql = ["diesel/mysql_backend", "mysql_async", "mysql_common"]
37-
postgres = ["diesel/postgres_backend", "tokio-postgres", "tokio", "tokio/rt-multi-thread"]
37+
postgres = ["diesel/postgres_backend", "tokio-postgres", "tokio"]
3838

3939
[[test]]
4040
name = "integration_tests"

src/doctest_setup.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,31 +106,31 @@ cfg_if::cfg_if! {
106106
}
107107

108108
async fn create_tables(connection: &mut AsyncMysqlConnection) {
109-
diesel::sql_query("CREATE TABLE IF NOT EXISTS users (
109+
diesel::sql_query("CREATE TEMPORARY TABLE IF NOT EXISTS users (
110110
id INTEGER PRIMARY KEY AUTO_INCREMENT,
111111
name TEXT NOT NULL
112112
) CHARACTER SET utf8mb4").execute(connection).await.unwrap();
113113

114114

115-
diesel::sql_query("CREATE TABLE IF NOT EXISTS animals (
115+
diesel::sql_query("CREATE TEMPORARY TABLE IF NOT EXISTS animals (
116116
id INTEGER PRIMARY KEY AUTO_INCREMENT,
117117
species TEXT NOT NULL,
118118
legs INTEGER NOT NULL,
119119
name TEXT
120120
) CHARACTER SET utf8mb4").execute(connection).await.unwrap();
121121

122-
diesel::sql_query("CREATE TABLE IF NOT EXISTS posts (
122+
diesel::sql_query("CREATE TEMPORARY TABLE IF NOT EXISTS posts (
123123
id INTEGER PRIMARY KEY AUTO_INCREMENT,
124124
user_id INTEGER NOT NULL,
125125
title TEXT NOT NULL
126126
) CHARACTER SET utf8mb4").execute(connection).await.unwrap();
127127

128-
diesel::sql_query("CREATE TABLE IF NOT EXISTS comments (
128+
diesel::sql_query("CREATE TEMPORARY TABLE IF NOT EXISTS comments (
129129
id INTEGER PRIMARY KEY AUTO_INCREMENT,
130130
post_id INTEGER NOT NULL,
131131
body TEXT NOT NULL
132132
) CHARACTER SET utf8mb4").execute(connection).await.unwrap();
133-
diesel::sql_query("CREATE TABLE IF NOT EXISTS brands (
133+
diesel::sql_query("CREATE TEMPORARY TABLE IF NOT EXISTS brands (
134134
id INTEGER PRIMARY KEY AUTO_INCREMENT,
135135
color VARCHAR(255) NOT NULL DEFAULT 'Green',
136136
accent VARCHAR(255) DEFAULT 'Blue'

0 commit comments

Comments
 (0)