Changed data import to add alongside rather than removing.
This commit is contained in:
@ -172,7 +172,7 @@ pub async fn import_reminders(
|
||||
|
||||
create_reminder(
|
||||
ctx.inner(),
|
||||
pool.inner(),
|
||||
transaction,
|
||||
GuildId(id),
|
||||
UserId(user_id),
|
||||
reminder,
|
||||
@ -320,13 +320,6 @@ pub async fn import_todos(
|
||||
}
|
||||
}
|
||||
|
||||
let _ = sqlx::query!(
|
||||
"DELETE FROM todos WHERE guild_id = (SELECT id FROM guilds WHERE guild = ?)",
|
||||
id
|
||||
)
|
||||
.execute(pool.inner())
|
||||
.await;
|
||||
|
||||
let query_str = format!(
|
||||
"INSERT INTO todos (value, channel_id, guild_id) VALUES {}",
|
||||
vec![query_placeholder].repeat(query_params.len()).join(",")
|
||||
|
Reference in New Issue
Block a user