Updated diesel dependency
This commit is contained in:
parent
abc401ce06
commit
d310c1fab0
5 changed files with 76 additions and 31 deletions
89
Cargo.lock
generated
89
Cargo.lock
generated
|
@ -300,40 +300,38 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "diesel"
|
||||
version = "0.16.0"
|
||||
source = "git+https://github.com/diesel-rs/diesel?rev=034049d#034049d38565393bf09d59dbe1e7ad38a8934295"
|
||||
version = "0.99.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"diesel_derives 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libsqlite3-sys 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "diesel"
|
||||
version = "0.16.0"
|
||||
name = "diesel_derives"
|
||||
version = "0.99.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libsqlite3-sys 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "diesel_codegen"
|
||||
version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"diesel 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"diesel_infer_schema 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"dotenv 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "diesel_infer_schema"
|
||||
version = "0.16.0"
|
||||
version = "0.99.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"diesel 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"infer_schema_macros 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "diesel_migrations"
|
||||
version = "0.99.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"migrations_internals 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"migrations_macros 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -634,6 +632,26 @@ dependencies = [
|
|||
"scoped_threadpool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "infer_schema_internals"
|
||||
version = "0.99.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"diesel 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "infer_schema_macros"
|
||||
version = "0.99.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"diesel 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"dotenv 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"infer_schema_internals 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "inflate"
|
||||
version = "0.2.0"
|
||||
|
@ -811,6 +829,24 @@ dependencies = [
|
|||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "migrations_internals"
|
||||
version = "0.99.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"diesel 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "migrations_macros"
|
||||
version = "0.99.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"migrations_internals 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mime"
|
||||
version = "0.2.6"
|
||||
|
@ -1146,8 +1182,9 @@ version = "0.7.1"
|
|||
dependencies = [
|
||||
"ape 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"app_dirs 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"diesel 0.16.0 (git+https://github.com/diesel-rs/diesel?rev=034049d)",
|
||||
"diesel_codegen 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"diesel 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"diesel_infer_schema 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"diesel_migrations 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.11.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1885,10 +1922,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
"checksum derive-error-chain 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3c9ca9ade651388daad7c993f005d0d20c4f6fe78c1cdc93e95f161c6f5ede4a"
|
||||
"checksum derive_builder 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "03600ae366b6eb2314e54d62adc833d9866da03798acc61c61789654ceaa227a"
|
||||
"checksum derive_builder_core 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eed37eae64daa5511467b1a55cebdf472deeaef108d22f62f25e8bbcaffd56ac"
|
||||
"checksum diesel 0.16.0 (git+https://github.com/diesel-rs/diesel?rev=034049d)" = "<none>"
|
||||
"checksum diesel 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "304226fa7a3982b0405f6bb95dd9c10c3e2000709f194038a60ec2c277150951"
|
||||
"checksum diesel_codegen 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18a42ca5c9b660add51d58bc5a50a87123380e1e458069c5504528a851ed7384"
|
||||
"checksum diesel_infer_schema 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bf1957ff5cd3b04772e43c162c2f69c2aa918080ff9b020276792d236be8be52"
|
||||
"checksum diesel 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0b97bd43f72d4819fac99f24d0030184c64c5ebdee96f94c7a7d4215c50506a7"
|
||||
"checksum diesel_derives 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ad228b6fd05c86050b95f56e497a8135073ffce28602e2200e63a21047eb474d"
|
||||
"checksum diesel_infer_schema 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)" = "87731d00bc7b4585cde88ebd84edfe7c856b6d322e706c205d3909a59f70fc27"
|
||||
"checksum diesel_migrations 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)" = "745dcfe39e3043c267e46dbe4f2ebbc9917039bdf4d81b108950be61244dfc89"
|
||||
"checksum dotenv 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d6f0e2bb24d163428d8031d3ebd2d2bd903ad933205a97d0f18c7c1aade380f3"
|
||||
"checksum dtoa 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0dd841b58510c9618291ffa448da2e4e0f699d984d436122372f446dae62263d"
|
||||
"checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab"
|
||||
|
@ -1923,6 +1960,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
"checksum id3 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fe971c235b6fd4d52ac6d2e71a816511dab3983e1f7fcaac7ea7a218d72b63cb"
|
||||
"checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d"
|
||||
"checksum image 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "634700d4a51fa91ceaa798001d46bf862c7b712bd691085d7ba6afd5521e21f7"
|
||||
"checksum infer_schema_internals 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb18c12a2b6ed321318b84567cad75a6a8409f67691e7a5247bcfa554adf65a4"
|
||||
"checksum infer_schema_macros 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)" = "31586f241395ae8b56e190fe7acd0b2d41bae13a1391ff3ecdb78e4b63287ff4"
|
||||
"checksum inflate 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d1238524675af3938a7c74980899535854b88ba07907bb1c944abe5b8fc437e5"
|
||||
"checksum iovec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b6e8b9c2247fcf6c6a1151f1156932be5606c9fd6f55a2d7f9fc1cb29386b2f7"
|
||||
"checksum iron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2440ae846e7a8c7f9b401db8f6e31b4ea5e7d3688b91761337da7e054520c75b"
|
||||
|
@ -1947,6 +1986,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20"
|
||||
"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d"
|
||||
"checksum metaflac 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1839a57e30c651fb9647d1c140dcda407282a2228cddb25a21c1708645621219"
|
||||
"checksum migrations_internals 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ac1d17f6f161f4d91cb7e5a72cce5b24a60b80f96580a8ac94351c56b8606a"
|
||||
"checksum migrations_macros 0.99.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dc767420eac6b718cd593aaa09c06a31d4ed228291c8538b274737e28a29939b"
|
||||
"checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0"
|
||||
"checksum mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e2e00e17be181010a91dbfefb01660b17311059dc8c7f48b9017677721e732bd"
|
||||
"checksum mime_guess 1.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "dc7e82a15629bb4ecd9e72365bf33d1382be91e030f820edb8e2a21c02430da8"
|
||||
|
|
|
@ -9,8 +9,9 @@ ui = []
|
|||
[dependencies]
|
||||
ape = "0.1.2"
|
||||
app_dirs = "1.1.1"
|
||||
diesel = { git = "https://github.com/diesel-rs/diesel", rev = "034049d", features = ["sqlite"] }
|
||||
diesel_codegen = { version = "0.16.0", features = ["sqlite"] }
|
||||
diesel = { version = "0.99.0", features = ["sqlite"] }
|
||||
diesel_infer_schema = { version = "0.99.0", features = ["sqlite"] }
|
||||
diesel_migrations = { version = "0.99.0", features = ["sqlite"] }
|
||||
error-chain = "0.11.0"
|
||||
getopts = "0.2.15"
|
||||
hyper = "0.11.2"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use core::ops::Deref;
|
||||
use diesel;
|
||||
use diesel_migrations;
|
||||
use diesel::prelude::*;
|
||||
use diesel::sqlite::SqliteConnection;
|
||||
use std::fs;
|
||||
|
@ -49,9 +49,9 @@ impl DB {
|
|||
let connection = self.connection.lock().unwrap();
|
||||
let connection = connection.deref();
|
||||
loop {
|
||||
match diesel::migrations::revert_latest_migration_in_directory(connection, Path::new(DB_MIGRATIONS_PATH)) {
|
||||
match diesel_migrations::revert_latest_migration_in_directory(connection, Path::new(DB_MIGRATIONS_PATH)) {
|
||||
Ok(_) => (),
|
||||
Err(diesel::migrations::RunMigrationsError::MigrationError(diesel::migrations::MigrationError::NoMigrationRun)) => break,
|
||||
Err(diesel_migrations::RunMigrationsError::MigrationError(diesel_migrations::MigrationError::NoMigrationRun)) => break,
|
||||
Err(e) => bail!(e),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use ape;
|
||||
use core;
|
||||
use diesel;
|
||||
use diesel_migrations;
|
||||
use id3;
|
||||
use getopts;
|
||||
use image;
|
||||
|
@ -19,7 +20,7 @@ error_chain! {
|
|||
Ape(ape::Error);
|
||||
Diesel(diesel::result::Error);
|
||||
DieselConnection(diesel::ConnectionError);
|
||||
DieselMigration(diesel::migrations::RunMigrationsError);
|
||||
DieselMigration(diesel_migrations::RunMigrationsError);
|
||||
Encoding(core::str::Utf8Error);
|
||||
Flac(metaflac::Error);
|
||||
GetOpts(getopts::Fail);
|
||||
|
|
|
@ -6,7 +6,9 @@ extern crate core;
|
|||
#[macro_use]
|
||||
extern crate diesel;
|
||||
#[macro_use]
|
||||
extern crate diesel_codegen;
|
||||
extern crate diesel_infer_schema;
|
||||
#[macro_use]
|
||||
extern crate diesel_migrations;
|
||||
#[macro_use]
|
||||
extern crate error_chain;
|
||||
extern crate getopts;
|
||||
|
|
Loading…
Add table
Reference in a new issue