Skip to content

Commit 20b4063

Browse files
committed
migrations: add deleted_crates.min_version
1 parent 1b416a4 commit 20b4063

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

crates/crates_io_database/src/schema.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,8 @@ diesel::table! {
428428
message -> Nullable<Varchar>,
429429
/// Date and time when users will be able to create a new crate with the same name
430430
available_at -> Timestamptz,
431+
/// The first version that can be used by a new crate with the same name
432+
min_version -> Nullable<Varchar>,
431433
}
432434
}
433435

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE deleted_crates
2+
DROP COLUMN min_version;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
ALTER TABLE deleted_crates
2+
ADD COLUMN min_version VARCHAR NULL;
3+
4+
COMMENT ON COLUMN deleted_crates.min_version IS 'The first version that can be used by a new crate with the same name';

src/models/deleted_crate.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ pub struct NewDeletedCrate<'a> {
1313
deleted_by: Option<i32>,
1414
message: Option<&'a str>,
1515
available_at: &'a DateTime<Utc>,
16+
min_version: Option<&'a str>,
1617
}

0 commit comments

Comments
 (0)