Skip to content

Commit

Permalink
update model
Browse files Browse the repository at this point in the history
  • Loading branch information
just-in-chang committed Oct 9, 2024
1 parent 8d47a75 commit a2023f8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DROP INDEX IF EXISTS asset_uploader_request_status_code;
DROP INDEX IF EXISTS asset_uploader_status_code_inserted_at;
DROP TABLE IF EXISTS nft_metadata_crawler.asset_uploader_request_statuses;
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ CREATE TABLE nft_metadata_crawler.asset_uploader_request_statuses (
error_message VARCHAR,
cdn_image_uri VARCHAR,
num_failures BIGINT NOT NULL DEFAULT 0,
request_received_at TIMESTAMP NOT NULL DEFAULT NOW(),
inserted_at TIMESTAMP NOT NULL DEFAULT NOW(),
PRIMARY KEY (request_id, asset_uri)
);
CREATE INDEX IF NOT EXISTS asset_uploader_request_status_code ON nft_metadata_crawler.asset_uploader_request_statuses (status_code);
CREATE INDEX IF NOT EXISTS asset_uploader_status_code_inserted_at ON nft_metadata_crawler.asset_uploader_request_statuses (status_code, inserted_at);
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ pub struct AssetUploaderRequestStatusesQuery {
pub error_message: Option<String>,
pub cdn_image_uri: Option<String>,
pub num_failures: i64,
pub request_received_at: chrono::NaiveDateTime,
pub inserted_at: chrono::NaiveDateTime,
}
4 changes: 1 addition & 3 deletions ecosystem/nft-metadata-crawler/src/schema.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

// @generated automatically by Diesel CLI.

pub mod nft_metadata_crawler {
Expand All @@ -13,6 +10,7 @@ pub mod nft_metadata_crawler {
error_message -> Nullable<Varchar>,
cdn_image_uri -> Nullable<Varchar>,
num_failures -> Int8,
request_received_at -> Timestamp,
inserted_at -> Timestamp,
}
}
Expand Down

0 comments on commit a2023f8

Please sign in to comment.