bug fixed
This commit is contained in:
parent
21436b69a7
commit
4f6a445617
|
@ -1,5 +1,5 @@
|
|||
CREATE TABLE IF NOT EXISTS api_kgon_synchronization_history (
|
||||
id SERIAL PRIMARY KEY,
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
item TEXT NOT NULL,
|
||||
start_at BIGINT NOT NULL,
|
||||
complete_at BIGINT NOT NULL,
|
||||
|
|
|
@ -11,7 +11,7 @@ pub static ITEM_GAMES: &str = "games";
|
|||
#[table_name = "api_kgon_synchronizations"]
|
||||
pub struct Synchronization {
|
||||
///
|
||||
pub id: i64,
|
||||
pub id: i32,
|
||||
///
|
||||
pub item: String,
|
||||
///
|
||||
|
|
|
@ -43,7 +43,7 @@ impl Repository {
|
|||
pub fn select(
|
||||
&self,
|
||||
conn: &diesel::PgConnection,
|
||||
id: i64,
|
||||
id: i32,
|
||||
) -> Result<Option<models::Synchronization>, Error> {
|
||||
match api_kgon_synchronizations::table
|
||||
.find(id)
|
||||
|
@ -81,7 +81,7 @@ impl Repository {
|
|||
pub fn update(
|
||||
&self,
|
||||
conn: &diesel::PgConnection,
|
||||
id: i64,
|
||||
id: i32,
|
||||
modify: &models::ModifySynchronization,
|
||||
) -> Result<u64, Error> {
|
||||
use api_kgon_synchronizations::dsl;
|
||||
|
@ -93,7 +93,7 @@ impl Repository {
|
|||
}
|
||||
|
||||
///
|
||||
pub fn delete(&self, conn: &diesel::PgConnection, id: i64) -> Result<u64, Error> {
|
||||
pub fn delete(&self, conn: &diesel::PgConnection, id: i32) -> Result<u64, Error> {
|
||||
use api_kgon_synchronizations::dsl;
|
||||
|
||||
diesel::delete(api_kgon_synchronizations::table.filter(dsl::id.eq(id)))
|
||||
|
|
|
@ -5,7 +5,7 @@ table! {
|
|||
///
|
||||
api_kgon_synchronizations(id) {
|
||||
///
|
||||
id -> BigInt,
|
||||
id -> Integer,
|
||||
///
|
||||
item -> Text,
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue
Block a user