-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/461-473 #491
Feat/461-473 #491
Conversation
Deploying with
|
Latest commit: |
d2632d0
|
Status: | ✅ Deploy successful! |
Preview URL: | https://9cf56666.nft-storage.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- How are we dealing with new users/nfts that are created after a sync?
- How do we sync a deleted NFT?
- How do we deal with the ordering of inserts to postgres and our foreign key constraints? Is it this?:
- Insert users
- Insert auth keys
- Insert content (normalized from
PINS
) - Insert pins (derived from
PINS
) - Insert uploads (
NFTS
)
- What are the tasks that have to be done during the downtime? i.e. after the initial sync has been done, but more data has arrived
- What time estimate do we have for this?
- How are we syncing the
PINS
table? I see no code for this... - Can you confirm these are no longer needed:
NFTS_IDX
can just queryupload where user_id = X order by inserted_at DESC
etc.FOLLOWUPS
we can just querypins where service = 'IpfsCluster' AND status <> Pinned
DEALS
is FDW & materialized viewsMETRICS
query postgres directly for now? yesPINATA_QUEUE
we can just querypins where service = 'Pinata' AND status <> Pinned
@@ -40,7 +51,8 @@ CREATE TABLE IF NOT EXISTS auth_key | |||
secret TEXT NOT NULL, | |||
account_id BIGINT NOT NULL REFERENCES account (id), | |||
inserted_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc'::text, now()) NOT NULL, | |||
updated_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc'::text, now()) NOT NULL | |||
updated_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc'::text, now()) NOT NULL, | |||
UNIQUE (name, account_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These can be deleted so they need a deleted_at
field and so cannot have this constraint, same as uploads. We can't undelete these - if a user deletes one and then creates a new one with the same name the old one should not start working again.
`) | ||
} | ||
|
||
run() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed. I ported it to #496
No description provided.