satellite/satellitedb/dbx: remove unused methods

Turns out that many methods generated with dbx where not used at all.
Lets remove them.

As a next step we can think about dropping tables like:
* user_credit
* offer

Change-Id: Id6cda81a701348db2a6b8b26daa22ae9c4f87cb4
This commit is contained in:
Michał Niewrzał 2021-02-24 14:54:45 +01:00 committed by Bill Thorp
parent badd6d12d4
commit 1af9400a23
2 changed files with 0 additions and 3542 deletions

View File

@ -11,10 +11,6 @@ model value_attribution (
)
create value_attribution ()
delete value_attribution (
where value_attribution.project_id = ?
where value_attribution.bucket_name = ?
)
read one (
select value_attribution
@ -35,8 +31,6 @@ model pending_audits (
field path blob
)
create pending_audits ( )
update pending_audits ( where pending_audits.node_id = ? )
delete pending_audits ( where pending_audits.node_id = ? )
read one (
select pending_audits
@ -110,11 +104,6 @@ model accounting_rollup (
create accounting_rollup ( noreturn, replace )
read all (
select accounting_rollup
where accounting_rollup.start_time >= ?
)
//--- overlay cache ---//
model node (
@ -192,13 +181,11 @@ model node (
field exit_success bool ( updatable, default false )
)
create node ( noreturn )
update node ( where node.id = ? )
update node (
where node.id = ?
noreturn
)
delete node ( where node.id = ? )
// "Get" query; fails if node not found
read one (
@ -210,32 +197,11 @@ read all (
select node.id
)
read limitoffset (
select node
where node.id >= ?
orderby asc node.id
)
read all (
select node.id node.piece_count
where node.piece_count != 0
)
read limitoffset (
select node.id node.address node.last_ip_port node.last_contact_success node.last_contact_failure
where node.last_contact_success < node.last_contact_failure
where node.disqualified = null
orderby asc node.last_contact_failure
)
read all (
select node.id node.address node.last_ip_port node.last_contact_success node.last_contact_failure
where node.last_contact_success < ?
where node.last_contact_success > node.last_contact_failure
where node.disqualified = null
orderby asc node.last_contact_success
)
//--- audit history ---//
model audit_history (
key node_id
@ -406,10 +372,6 @@ read all (
select project_member
where project_member.member_id = ?
)
read limitoffset (
select project_member
where project_member.project_id = ?
)
model api_key (
key id
@ -445,11 +407,6 @@ read one (
where api_key.name = ?
where api_key.project_id = ?
)
read all (
select api_key
where api_key.project_id = ?
orderby asc api_key.name
)
// --- bucket accounting tables --- //
@ -476,14 +433,6 @@ model bucket_bandwidth_rollup (
field settled uint64 ( updatable )
)
read scalar (
select bucket_bandwidth_rollup
where bucket_bandwidth_rollup.bucket_name = ?
where bucket_bandwidth_rollup.project_id = ?
where bucket_bandwidth_rollup.interval_start = ?
where bucket_bandwidth_rollup.action = ?
)
read paged (
select bucket_bandwidth_rollup
where bucket_bandwidth_rollup.interval_start >= ?
@ -533,12 +482,6 @@ model project_bandwidth_rollup (
field egress_allocated uint64 ( updatable )
)
read scalar (
select project_bandwidth_rollup
where project_bandwidth_rollup.project_id = ?
where project_bandwidth_rollup.interval_month = ?
)
model bucket_storage_tally (
key bucket_name project_id interval_start
@ -564,12 +507,6 @@ model bucket_storage_tally (
create bucket_storage_tally ( noreturn )
read first (
select bucket_storage_tally
where bucket_storage_tally.project_id = ?
orderby desc bucket_storage_tally.interval_start
)
read all (
select bucket_storage_tally
)
@ -661,8 +598,6 @@ model storagenode_bandwidth_rollup_phase2 (
field settled uint64 ( updatable )
)
create storagenode_bandwidth_rollup_phase2 ( )
read paged (
select storagenode_bandwidth_rollup_phase2
where storagenode_bandwidth_rollup_phase2.storagenode_id = ?
@ -877,23 +812,6 @@ model offer (
field type int ( updatable )
)
read one (
select offer
where offer.id = ?
)
read all (
select offer
orderby asc offer.id
)
update offer (
where offer.id = ?
noreturn
)
create offer ( )
//--- user credit table ---//
@ -920,21 +838,6 @@ model user_credit (
field created_at timestamp ( autoinsert )
)
read all (
select user_credit
where user_credit.user_id = ?
where user_credit.expires_at > ?
where user_credit.credits_used_in_cents < user_credit.credits_earned_in_cents
orderby asc user_credit.expires_at
)
read count (
select user_credit
where user_credit.referred_by = ?
)
create user_credit ()
//--- metainfo buckets ---//
model bucket_metainfo (
@ -1025,12 +928,6 @@ model graceful_exit_progress (
field updated_at timestamp ( autoinsert, autoupdate )
)
create graceful_exit_progress ( noreturn )
update graceful_exit_progress (
where graceful_exit_progress.node_id = ?
noreturn
)
delete graceful_exit_progress ( where graceful_exit_progress.node_id = ? )
read one (
select graceful_exit_progress
where graceful_exit_progress.node_id = ?
@ -1061,7 +958,6 @@ model graceful_exit_transfer_queue (
)
)
create graceful_exit_transfer_queue ( noreturn )
update graceful_exit_transfer_queue (
where graceful_exit_transfer_queue.node_id = ?
where graceful_exit_transfer_queue.path = ?
@ -1136,12 +1032,6 @@ read all (
where coinpayments_transaction.user_id = ?
orderby desc coinpayments_transaction.created_at
)
read limitoffset (
select coinpayments_transaction
where coinpayments_transaction.created_at <= ?
where coinpayments_transaction.status = ?
orderby desc coinpayments_transaction.created_at
)
model stripecoinpayments_apply_balance_intent (
key tx_id
@ -1152,14 +1042,6 @@ model stripecoinpayments_apply_balance_intent (
field created_at timestamp ( autoinsert )
)
create stripecoinpayments_apply_balance_intent ()
update stripecoinpayments_apply_balance_intent (
where stripecoinpayments_apply_balance_intent.tx_id = ?
)
delete stripecoinpayments_apply_balance_intent (
where stripecoinpayments_apply_balance_intent.tx_id = ?
)
model stripecoinpayments_invoice_project_record (
key id
@ -1181,10 +1063,6 @@ create stripecoinpayments_invoice_project_record ()
update stripecoinpayments_invoice_project_record (
where stripecoinpayments_invoice_project_record.id = ?
)
delete stripecoinpayments_invoice_project_record (
where stripecoinpayments_invoice_project_record.id = ?
)
read one (
select stripecoinpayments_invoice_project_record
where stripecoinpayments_invoice_project_record.project_id = ?

File diff suppressed because it is too large Load Diff