We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3657d2f commit 49af00bCopy full SHA for 49af00b
44_data_processing/examples/user.rs
@@ -70,7 +70,9 @@ impl UserDb {
70
71
/// 重新创建 users 表
72
async fn recreate_table(pool: &SqlitePool) -> Result<()> {
73
- sqlx::query("DROP TABLE users").execute(pool).await?;
+ sqlx::query("DROP TABLE IF EXISTS users")
74
+ .execute(pool)
75
+ .await?;
76
sqlx::query(
77
r#"CREATE TABLE IF NOT EXISTS users(
78
id INTEGER PRIMARY KEY NOT NULL,
0 commit comments