Skip to content

Commit

Permalink
move database
Browse files Browse the repository at this point in the history
  • Loading branch information
warycat committed Jan 14, 2022
1 parent d888000 commit baa5fb8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions consts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ pub const GOOGLE_SRC: &str = "google/src/";
// pub const HACKERRANK_SRC: &str = "rustgym/src/hackerrank";
// pub const HACKERRANK_DESC: &str = "rustgym/desc/hackerrank";

pub const DATABASE_URL: &str = "rustgym.sqlite";
pub const OPENVGDB_URL: &str = "openvgdb.sqlite";
pub const DATABASE_URL: &str = "./data/sqlite/rustgym.sqlite";
pub const OPENVGDB_URL: &str = "./data/sqlite/openvgdb.sqlite";
pub const HEARTBEAT_INTERVAL: Duration = Duration::from_secs(5);
pub const CLIENT_TIMEOUT: Duration = Duration::from_secs(10);
pub const SONIC_URL: &str = "localhost:1491";
Expand Down
2 changes: 2 additions & 0 deletions openvgdb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ use diesel::sqlite::SqliteConnection;
use md5;
use rustgym_consts::*;
use std::fs::*;
#[allow(non_snake_case)]
mod rom;
#[allow(non_snake_case)]
mod schema;
use rom::RomData;
use rustgym_schema::*;
Expand Down
2 changes: 0 additions & 2 deletions openvgdb/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#[macro_use]
extern crate diesel;
use diesel::insert_into;
use diesel::prelude::*;
use diesel::sqlite::SqliteConnection;
Expand Down
2 changes: 0 additions & 2 deletions openvgdb/src/rom.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use crate::schema::*;

#[derive(Debug, Queryable)]
pub struct RomData {
pub romID: Option<i32>,
Expand Down

0 comments on commit baa5fb8

Please sign in to comment.