Skip to content

Commit

Permalink
Add is_active column to nft_metadata table (#97)
Browse files Browse the repository at this point in the history
* Add `is_active` column to `nft_metadata` table

* Add `is_active` to `NftMetadata` struct
  • Loading branch information
tifrel authored Mar 11, 2024
1 parent 1f9ef8f commit 5121162
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ select_permissions:
- max_supply
- last_possible_mint
- is_locked
- is_active
filter: {}
allow_aggregations: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter table nft_metadata
drop is_active;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter table nft_metadata
add is_active boolean not null default true;
1 change: 1 addition & 0 deletions src/db_rows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ pub struct NftMetadata {
pub max_supply: Option<BigDecimal>,
pub last_possible_mint: Option<NaiveDateTime>,
pub is_locked: Option<bool>,
pub is_active: bool,
}

#[derive(Clone, diesel::Insertable, diesel::Queryable, diesel::AsChangeset)]
Expand Down
1 change: 1 addition & 0 deletions src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ diesel::table! {
max_supply -> Nullable<Numeric>,
last_possible_mint -> Nullable<Timestamp>,
is_locked -> Nullable<Bool>,
is_active -> Bool,
}
}

Expand Down

0 comments on commit 5121162

Please sign in to comment.