Update dependencies, adapt code, fix warnings

This commit is contained in:
Elias Projahn 2023-03-28 14:39:54 +02:00
parent 75d4e82cf8
commit 835d4f0d42
44 changed files with 595 additions and 541 deletions

View file

@ -2,7 +2,7 @@ use chrono::Utc;
use diesel::prelude::*;
use log::info;
use crate::{Result, schema::ensembles, defer_foreign_keys};
use crate::{defer_foreign_keys, schema::ensembles, Result};
/// An ensemble that takes part in recordings.
#[derive(Insertable, Queryable, PartialEq, Eq, Hash, Debug, Clone)]

View file

@ -82,7 +82,7 @@ impl Track {
/// Table data for a [`Medium`].
#[derive(Insertable, Queryable, Debug, Clone)]
#[table_name = "mediums"]
#[diesel(table_name = mediums)]
struct MediumRow {
pub id: String,
pub name: String,
@ -93,7 +93,7 @@ struct MediumRow {
/// Table data for a [`Track`].
#[derive(Insertable, Queryable, QueryableByName, Debug, Clone)]
#[table_name = "tracks"]
#[diesel(table_name = tracks)]
struct TrackRow {
pub id: String,
pub medium: Option<String>,

View file

@ -97,7 +97,7 @@ impl PersonOrEnsemble {
/// Database table data for a recording.
#[derive(Insertable, Queryable, QueryableByName, Debug, Clone)]
#[table_name = "recordings"]
#[diesel(table_name = recordings)]
struct RecordingRow {
pub id: String,
pub work: String,
@ -120,7 +120,7 @@ impl From<Recording> for RecordingRow {
/// Database table data for a performance.
#[derive(Insertable, Queryable, Debug, Clone)]
#[table_name = "performances"]
#[diesel(table_name = performances)]
struct PerformanceRow {
pub id: i64,
pub recording: String,

View file

@ -10,7 +10,7 @@ use crate::{
/// Table row data for a work.
#[derive(Insertable, Queryable, Debug, Clone)]
#[table_name = "works"]
#[diesel(table_name = works)]
struct WorkRow {
pub id: String,
pub composer: String,
@ -33,7 +33,7 @@ impl From<Work> for WorkRow {
/// Definition that a work uses an instrument.
#[derive(Insertable, Queryable, Debug, Clone)]
#[table_name = "instrumentations"]
#[diesel(table_name = instrumentations)]
struct InstrumentationRow {
pub id: i64,
pub work: String,
@ -42,7 +42,7 @@ struct InstrumentationRow {
/// Table row data for a work part.
#[derive(Insertable, Queryable, Debug, Clone)]
#[table_name = "work_parts"]
#[diesel(table_name = work_parts)]
struct WorkPartRow {
pub id: i64,
pub work: String,