Rename database tables to use plural names
This commit is contained in:
@@ -5,10 +5,10 @@ use diesel::{
|
||||
};
|
||||
|
||||
use crate::appointment::Appointment;
|
||||
use crate::schema::{chat, reminder};
|
||||
use crate::schema::{chats, reminders};
|
||||
|
||||
#[derive(Queryable, Selectable, Identifiable)]
|
||||
#[diesel(table_name = chat)]
|
||||
#[diesel(table_name = chats)]
|
||||
pub struct DbChat {
|
||||
id: i32,
|
||||
telegram_id: i64,
|
||||
@@ -22,7 +22,7 @@ pub struct DbChat {
|
||||
|
||||
#[derive(Queryable, Selectable, Identifiable, Associations)]
|
||||
#[diesel(belongs_to(DbChat, foreign_key=chat_id))]
|
||||
#[diesel(table_name = reminder)]
|
||||
#[diesel(table_name = reminders)]
|
||||
pub struct DbReminder {
|
||||
id: i32,
|
||||
chat_id: i32,
|
||||
|
||||
Reference in New Issue
Block a user