Skip to content

Commit

Permalink
Sync the code with the DB schema that Diesel detects
Browse files Browse the repository at this point in the history
It turns out that the order of the columns in the schema reflects the order that
they are added in the DB migrations, and the order in the Queryable struct must
match as well. So, fix that.
  • Loading branch information
pkgw committed Dec 4, 2018
1 parent fd5c1e3 commit db7687d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ pub struct Doc {
/// This value can change.
pub name: String,

/// The MIME type of this document.
///
/// Special values include:
///
/// - `application/vnd.google-apps.folder`, which indicates a folder
pub mime_type: String,

/// Whether the user has starred this document.
pub starred: bool,

Expand All @@ -50,6 +43,13 @@ pub struct Doc {
/// Prefer `utc_mod_time()` to get this information with correct timezone
/// tagging. (Namely, that this value is UTC.)
pub modified_time: NaiveDateTime,

/// The MIME type of this document.
///
/// Special values include:
///
/// - `application/vnd.google-apps.folder`, which indicates a folder
pub mime_type: String,
}

impl Doc {
Expand Down
2 changes: 1 addition & 1 deletion src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ table! {
docs (id) {
id -> Text,
name -> Text,
mime_type -> Text,
starred -> Bool,
trashed -> Bool,
modified_time -> Timestamp,
mime_type -> Text,
}
}

Expand Down

0 comments on commit db7687d

Please sign in to comment.