Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

versions: Adjust checksum column to be NOT NULL #5135

Merged
merged 1 commit into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions migrations/2022-08-28-191319_non-null-checksum/down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter table versions
alter column checksum drop not null;
2 changes: 2 additions & 0 deletions migrations/2022-08-28-191319_non-null-checksum/up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter table versions
alter column checksum set not null;
2 changes: 1 addition & 1 deletion src/models/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub struct Version {
pub license: Option<String>,
pub crate_size: Option<i32>,
pub published_by: Option<i32>,
pub checksum: Option<String>,
pub checksum: String,
pub links: Option<String>,
}

Expand Down
4 changes: 2 additions & 2 deletions src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -990,10 +990,10 @@ table! {
published_by -> Nullable<Int4>,
/// The `checksum` column of the `versions` table.
///
/// Its SQL type is `Nullable<Bpchar>`.
/// Its SQL type is `Bpchar`.
///
/// (Automatically generated by Diesel.)
checksum -> Nullable<Bpchar>,
checksum -> Bpchar,
/// The `links` column of the `versions` table.
///
/// Its SQL type is `Nullable<Varchar>`.
Expand Down