bug fixed

This commit is contained in:
병준 박 2022-08-18 06:02:23 +00:00
parent 21436b69a7
commit 4f6a445617
4 changed files with 6 additions and 6 deletions

View File

@ -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,

View File

@ -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,
///

View File

@ -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)))

View File

@ -5,7 +5,7 @@ table! {
///
api_kgon_synchronizations(id) {
///
id -> BigInt,
id -> Integer,
///
item -> Text,
///