add autoincrement to my_messages
This commit is contained in:
parent
659e57f0ea
commit
8dc475fe45
|
@ -76,13 +76,12 @@ pub fn add_message(message: Message, conn: &Connection) -> Result<()> {
|
||||||
pub fn add_my_message(message: Message, conn: &Connection) -> Result<()> {
|
pub fn add_my_message(message: Message, conn: &Connection) -> Result<()> {
|
||||||
match conn.execute(
|
match conn.execute(
|
||||||
"INSERT INTO messages (
|
"INSERT INTO messages (
|
||||||
id,
|
|
||||||
user_id,
|
user_id,
|
||||||
date,
|
date,
|
||||||
message,
|
message,
|
||||||
from_me
|
from_me
|
||||||
) VALUES (?1, ?2, ?3, ?4, ?5)",
|
) VALUES (?1, ?2, ?3, ?4)",
|
||||||
params![message.id, message.user_id, message.date, message.message, true],
|
params![message.user_id, message.date, message.message, true],
|
||||||
) {
|
) {
|
||||||
Ok(_) => log::info!("message {:} added succsessfully!", message.id),
|
Ok(_) => log::info!("message {:} added succsessfully!", message.id),
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
|
|
Loading…
Reference in a new issue