From c0b600f721c7105c80a09d1e95e08f0d79bee047 Mon Sep 17 00:00:00 2001 From: Arkadiy Kukarkin Date: Thu, 19 Sep 2024 15:06:40 +0200 Subject: [PATCH] update database schema diagram --- docs/database-diagram.svg | 1539 +++++++++++++++++++------------------ 1 file changed, 777 insertions(+), 762 deletions(-) diff --git a/docs/database-diagram.svg b/docs/database-diagram.svg index 7480a54bb..109a0e19b 100644 --- a/docs/database-diagram.svg +++ b/docs/database-diagram.svg @@ -4,810 +4,825 @@ - - + + SchemaCrawler_Diagram - -generated by -SchemaCrawler 16.20.4 -generated on -2023-07-27 21:56:13 - + +generated by +SchemaCrawler 16.22.2 +generated on +2024-09-19 13:06:08 + car_blocks_376c08b0 - -car_blocks - -[table] -id - -INTEGER -car_id - -INTEGER -cid - -BLOB -car_offset - -INTEGER -car_block_length - -INTEGER -varint - -BLOB -raw_block - -BLOB -item_id - -INTEGER -item_offset - -INTEGER -item_encrypted - -NUMERIC - + +car_blocks + +[table] +id + +INTEGER +cid + +BLOB +car_offset + +INTEGER +car_block_length + +INTEGER +varint + +BLOB +raw_block + +BLOB +file_offset + +INTEGER +car_id + +INTEGER +file_id + +INTEGER + cars_2eef7e - -cars - -[table] -id - -INTEGER -created_at - -DATETIME -piece_cid - -BLOB -piece_size - -INTEGER -root_cid - -BLOB -file_size - -INTEGER -file_path - -TEXT -dataset_id - -INTEGER -source_id - -INTEGER -chunk_id - -INTEGER -header - -BLOB - + +cars + +[table] +id + +INTEGER +created_at + +DATETIME +piece_cid + +BLOB +piece_size + +INTEGER +root_cid + +BLOB +file_size + +INTEGER +storage_id + +INTEGER +storage_path + +TEXT +num_of_files + +INTEGER +preparation_id + +INTEGER +attachment_id + +INTEGER +job_id + +INTEGER + car_blocks_376c08b0:w->cars_2eef7e:e - - - - - - - -SCHCRWLR_002E7B1F_376B9451 - - - -items_5fe5c1f - -items - -[table] -id - -INTEGER -created_at - -DATETIME -source_id - -INTEGER -path - -TEXT -hash - -TEXT -size - -INTEGER -last_modified_timestamp_nano - -INTEGER -cid - -BLOB -directory_id - -INTEGER - - - - -car_blocks_376c08b0:w->items_5fe5c1f:e - - - - - - - -SCHCRWLR_05FDE7C0_376B9451 - - - -chunks_aee0a005 - -chunks - -[table] -id - -INTEGER -created_at - -DATETIME -source_id - -INTEGER -packing_state - -TEXT -packing_worker_id - -TEXT -error_message - -TEXT - - - - -cars_2eef7e:w->chunks_aee0a005:e - - - - - - - -SCHCRWLR_AEE02BA6_002E7B1F - - + + + + + + + +SCHCRWLR_002E7B1F_376B9451 + + -datasets_6ab14f5a - -datasets - -[table] -id - -INTEGER -name - -TEXT -created_at - -DATETIME -updated_at - -DATETIME -max_size - -INTEGER -piece_size - -INTEGER -output_dirs - -JSON -encryption_recipients - -JSON -encryption_script - -TEXT - - - +files_5cf2ed6 + +files + +[table] +id + +INTEGER +cid + +BLOB +path + +TEXT +hash + +TEXT +size + +INTEGER +last_modified_nano + +INTEGER +attachment_id + +INTEGER +directory_id + +INTEGER + + + -cars_2eef7e:w->datasets_6ab14f5a:e - - - - - - - -SCHCRWLR_6AB0DAFB_002E7B1F - - +car_blocks_376c08b0:w->files_5cf2ed6:e + + + + + + + +SCHCRWLR_05CEBA77_376B9451 + + -sources_877d1017 - -sources - -[table] -id - -INTEGER -created_at - -DATETIME -updated_at - -DATETIME -dataset_id - -INTEGER -type - -TEXT -path - -TEXT -metadata - -JSON -scan_interval_seconds - -INTEGER -scanning_state - -TEXT -scanning_worker_id - -TEXT -last_scanned_timestamp - -INTEGER -last_scanned_path - -TEXT -error_message - -TEXT -delete_after_export - -NUMERIC -dag_gen_state - -TEXT -dag_gen_worker_id - -TEXT -dag_gen_error_message - -TEXT - - - +jobs_3250b5 + +jobs + +[table] +id + +INTEGER +type + +TEXT +state + +TEXT +error_message + +TEXT +error_stack_trace + +TEXT +worker_id + +TEXT +attachment_id + +INTEGER + + + + +cars_2eef7e:w->jobs_3250b5:e + + + + + + + +SCHCRWLR_0031DC56_002E7B1F + + + +preparations_816d211b + +preparations + +[table] +id + +INTEGER +name + +TEXT +created_at + +DATETIME +updated_at + +DATETIME +delete_after_export + +NUMERIC +max_size + +INTEGER +piece_size + +INTEGER +no_inline + +NUMERIC +no_dag + +NUMERIC + + + + +cars_2eef7e:w->preparations_816d211b:e + + + + + + + +SCHCRWLR_816CACBC_002E7B1F + + + +source_attachments_83e6b5eb + +source_attachments + +[table] +id + +INTEGER +preparation_id + +INTEGER +storage_id + +INTEGER + + + -cars_2eef7e:w->sources_877d1017:e - - - - - - - -SCHCRWLR_877C9BB8_002E7B1F - - - -chunks_aee0a005:w->sources_877d1017:e - - - - - - - -SCHCRWLR_877C9BB8_AEE02BA6 - - +cars_2eef7e:w->source_attachments_83e6b5eb:e + + + + + + + +SCHCRWLR_83E6418C_002E7B1F + + -workers_5ae89114 - -workers - -[table] -id - -TEXT -work_type - -TEXT -working_on - -TEXT -last_heartbeat - -DATETIME -hostname - -TEXT - - - - -chunks_aee0a005:w->workers_5ae89114:e - - - - - - - -SCHCRWLR_5AE81CB5_AEE02BA6 - - - -item_parts_8b749313 - -item_parts - -[table] -id - -INTEGER -item_id - -INTEGER -offset - -INTEGER -length - -INTEGER -cid - -BLOB -chunk_id - -INTEGER - - - - -item_parts_8b749313:w->chunks_aee0a005:e - - - - - - - -SCHCRWLR_AEE02BA6_8B741EB4 - - - -item_parts_8b749313:w->items_5fe5c1f:e - - - - - - - -SCHCRWLR_05FDE7C0_8B741EB4 +storages_665881b7 + +storages + +[table] +id + +INTEGER +name + +TEXT +created_at + +DATETIME +updated_at + +DATETIME +type + +TEXT +path + +TEXT +config + +JSON +client_config + +JSON + + + + +cars_2eef7e:w->storages_665881b7:e + + + + + + + +SCHCRWLR_66580D58_002E7B1F - + deals_5b105e6 - -deals - -[table] -id - -INTEGER -created_at - -DATETIME -updated_at - -DATETIME -deal_id - -INTEGER -dataset_id - -INTEGER -state - -TEXT -client_id - -TEXT -provider - -TEXT -proposal_id - -TEXT -label - -TEXT -piece_cid - -BLOB -piece_size - -INTEGER -start_epoch - -INTEGER -end_epoch - -INTEGER -sector_start_epoch - -INTEGER -price - -TEXT -verified - -NUMERIC -error_message - -TEXT -schedule_id - -INTEGER - - - - -deals_5b105e6:w->datasets_6ab14f5a:e - - - - - - - -SCHCRWLR_6AB0DAFB_05B09187 + +deals + +[table] +id + +INTEGER +created_at + +DATETIME +updated_at + +DATETIME +last_verified_at + +DATETIME +deal_id + +INTEGER +state + +TEXT +provider + +TEXT +proposal_id + +TEXT +label + +TEXT +piece_cid + +BLOB +piece_size + +INTEGER +start_epoch + +INTEGER +end_epoch + +INTEGER +sector_start_epoch + +INTEGER +price + +TEXT +verified + +NUMERIC +error_message + +TEXT +schedule_id + +INTEGER +client_id + +TEXT + - + schedules_f66c351b - -schedules - -[table] -id - -INTEGER -created_at - -DATETIME -updated_at - -DATETIME -dataset_id - -INTEGER -url_template - -TEXT -http_headers - -JSON -provider - -TEXT -price_per_gb_epoch - -REAL -price_per_gb - -REAL -price_per_deal - -REAL -total_deal_number - -INTEGER -total_deal_size - -INTEGER -verified - -NUMERIC -keep_unsealed - -NUMERIC -announce_to_ip_ni - -NUMERIC -start_delay - -INTEGER -duration - -INTEGER -state - -TEXT -schedule_cron - -TEXT -schedule_deal_number - -INTEGER -schedule_deal_size - -INTEGER -max_pending_deal_number - -INTEGER -max_pending_deal_size - -INTEGER -notes - -TEXT -error_message - -TEXT -allowed_piece_c_ids - -BLOB - + +schedules + +[table] +id + +INTEGER +created_at + +DATETIME +updated_at + +DATETIME +url_template + +TEXT +http_headers + +JSON +provider + +TEXT +price_per_gb_epoch + +REAL +price_per_gb + +REAL +price_per_deal + +REAL +total_deal_number + +INTEGER +total_deal_size + +INTEGER +verified + +NUMERIC +keep_unsealed + +NUMERIC +announce_to_ipni + +NUMERIC +start_delay + +INTEGER +duration + +INTEGER +state + +TEXT +schedule_cron + +TEXT +schedule_cron_perpetual + +NUMERIC +schedule_deal_number + +INTEGER +schedule_deal_size + +INTEGER +max_pending_deal_number + +INTEGER +max_pending_deal_size + +INTEGER +notes + +TEXT +error_message + +TEXT +allowed_piece_cids + +JSON +force + +NUMERIC +preparation_id + +INTEGER + deals_5b105e6:w->schedules_f66c351b:e - - - - - - - -SCHCRWLR_F66BC0BC_05B09187 + + + + + + + +SCHCRWLR_F66BC0BC_05B09187 - + wallets_42b09ff9 - -wallets - -[table] -id - -TEXT -address - -TEXT -private_key - -TEXT -remote_peer - -TEXT - + +wallets + +[table] +id + +TEXT +address + +TEXT +private_key + +TEXT + - -deals_5b105e6:w->wallets_42b09ff9:e - - - - - - - -SCHCRWLR_42B02B9A_05B09187 - - - -schedules_f66c351b:w->datasets_6ab14f5a:e - - - - - - - -SCHCRWLR_6AB0DAFB_F66BC0BC - - - -sources_877d1017:w->datasets_6ab14f5a:e - - - - - - - -SCHCRWLR_6AB0DAFB_877C9BB8 - - -sources_877d1017:w->workers_5ae89114:e - - - - - - - -SCHCRWLR_5AE81CB5_877C9BB8 - - - -sources_877d1017:w->workers_5ae89114:e - - - - - - - -SCHCRWLR_5AE81CB5_877C9BB8 - - - -wallet_assignments_75594c5f - -wallet_assignments - -[table] -id - -INTEGER -wallet_id - -TEXT -dataset_id - -INTEGER - - - - -wallet_assignments_75594c5f:w->datasets_6ab14f5a:e - - - - - - - -SCHCRWLR_6AB0DAFB_7558D800 - - - -wallet_assignments_75594c5f:w->wallets_42b09ff9:e - - - - - - - -SCHCRWLR_42B02B9A_7558D800 +deals_5b105e6:w->wallets_42b09ff9:e + + + + + + + +SCHCRWLR_42B02B9A_05B09187 - + directories_9f127c2a - -directories - -[table] -id - -INTEGER -updated_at - -DATETIME -cid - -BLOB -source_id - -INTEGER -data - -BLOB -name - -TEXT -parent_id - -INTEGER -exported - -NUMERIC - - - - -directories_9f127c2a:w->sources_877d1017:e - - - - - - - -SCHCRWLR_877C9BB8_9F1207CB + +directories + +[table] +id + +INTEGER +cid + +BLOB +data + +BLOB +name + +TEXT +exported + +NUMERIC +attachment_id + +INTEGER +parent_id + +INTEGER + - + directories_9f127c2a:w->directories_9f127c2a:e - - - - - - - -SCHCRWLR_9F1207CB_9F1207CB - - - -items_5fe5c1f:w->sources_877d1017:e - - - - - - - -SCHCRWLR_877C9BB8_05FDE7C0 - - - -items_5fe5c1f:w->directories_9f127c2a:e - - - - - - - -SCHCRWLR_9F1207CB_05FDE7C0 + + + + + + + +SCHCRWLR_9F1207CB_9F1207CB + + + +directories_9f127c2a:w->source_attachments_83e6b5eb:e + + + + + + + +SCHCRWLR_83E6418C_9F1207CB + + + +files_5cf2ed6:w->directories_9f127c2a:e + + + + + + + +SCHCRWLR_9F1207CB_05CEBA77 + + + +files_5cf2ed6:w->source_attachments_83e6b5eb:e + + + + + + + +SCHCRWLR_83E6418C_05CEBA77 + + + +file_ranges_77778758 + +file_ranges + +[table] +id + +INTEGER +offset + +INTEGER +length + +INTEGER +cid + +BLOB +job_id + +INTEGER +file_id + +INTEGER + + + + +file_ranges_77778758:w->files_5cf2ed6:e + + + + + + + +SCHCRWLR_05CEBA77_777712F9 + + + +file_ranges_77778758:w->jobs_3250b5:e + + + + + + + +SCHCRWLR_0031DC56_777712F9 - + globals_737e58f - -globals - -[table] -key - -TEXT -"value" - -TEXT - + +globals + +[table] +key + +TEXT +"value" + +TEXT + + + + +jobs_3250b5:w->source_attachments_83e6b5eb:e + + + + + + + +SCHCRWLR_83E6418C_0031DC56 + + + +workers_5ae89114 + +workers + +[table] +id + +TEXT +last_heartbeat + +DATETIME +hostname + +TEXT +type + +TEXT + + + + +jobs_3250b5:w->workers_5ae89114:e + + + + + + + +SCHCRWLR_5AE81CB5_0031DC56 + + + +output_attachments_9b973dd1 + +output_attachments + +[table] +id + +INTEGER +preparation_id + +INTEGER +storage_id + +INTEGER + + + + +output_attachments_9b973dd1:w->preparations_816d211b:e + + + + + + + +SCHCRWLR_816CACBC_9B96C972 + + + +output_attachments_9b973dd1:w->storages_665881b7:e + + + + + + + +SCHCRWLR_66580D58_9B96C972 + + + +schedules_f66c351b:w->preparations_816d211b:e + + + + + + + +SCHCRWLR_816CACBC_F66BC0BC + + + +source_attachments_83e6b5eb:w->preparations_816d211b:e + + + + + + + +SCHCRWLR_816CACBC_83E6418C + + + +source_attachments_83e6b5eb:w->storages_665881b7:e + + + + + + + +SCHCRWLR_66580D58_83E6418C + + + +wallet_assignments_75594c5f + +wallet_assignments + +[table] +preparation_id + +INTEGER +wallet_id + +TEXT + + + + +wallet_assignments_75594c5f:w->preparations_816d211b:e + + + + + + + +SCHCRWLR_816CACBC_7558D800 + + + +wallet_assignments_75594c5f:w->wallets_42b09ff9:e + + + + + + + +SCHCRWLR_42B02B9A_7558D800