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