-
Notifications
You must be signed in to change notification settings - Fork 302
feat(fortuna): Support Postgres DB backend #2841
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
79bdfd5
use AnyPool for generic SQL cxn, add postgres migrations
tejasbadadare fad52e1
migrations
tejasbadadare 8a986c9
fix sqlite issues
tejasbadadare 8683539
fix sqlite issues
tejasbadadare 3d059e5
Merge branch 'main' of github.com:pyth-network/pyth-crosschain into t…
tejasbadadare 751c69a
remove old migrations, update migrations!()
tejasbadadare d3354ff
bump ver
tejasbadadare File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,3 +4,4 @@ | |
| *private-key* | ||
| .envrc | ||
| fortuna.db* | ||
| .env* | ||
12 changes: 0 additions & 12 deletions
12
...fortuna/.sqlx/query-03901bcfb28b127d99fe8a53e480b88336dd2aab632411114f02ce8dd8fe07e8.json
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
...fortuna/.sqlx/query-4c8c05ec08e128d847faafdd3d79fa50da70066f30b74f354e5d3a843ba6a2c0.json
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
...fortuna/.sqlx/query-b0d9afebb3825c3509ad80e5ebab5d72360326593407518770fe537ac3da1e10.json
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| DROP TABLE IF EXISTS request; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| CREATE TABLE request( | ||
| chain_id VARCHAR(20) NOT NULL, | ||
| network_id INTEGER NOT NULL, | ||
| provider VARCHAR(40) NOT NULL, | ||
| sequence INTEGER NOT NULL, | ||
| created_at INTEGER NOT NULL, | ||
| last_updated_at INTEGER NOT NULL, | ||
| state VARCHAR(10) NOT NULL, | ||
| request_block_number INTEGER NOT NULL, | ||
| request_tx_hash VARCHAR(64) NOT NULL, | ||
| user_random_number VARCHAR(64) NOT NULL, | ||
| sender VARCHAR(40) NOT NULL, | ||
| reveal_block_number INTEGER, | ||
| reveal_tx_hash VARCHAR(64), | ||
| provider_random_number VARCHAR(64), | ||
| info TEXT, | ||
| gas_used VARCHAR(100), | ||
| gas_limit VARCHAR(100) NOT NULL, | ||
| PRIMARY KEY (network_id, sequence, provider, request_tx_hash) | ||
| ); | ||
|
|
||
| CREATE INDEX request__network_id__state__created_at ON request(network_id, state, created_at); | ||
| CREATE INDEX request__network_id__created_at ON request(network_id, created_at); | ||
| CREATE INDEX request__sender__network_id__state__created_at ON request(sender, network_id, state, created_at); | ||
| CREATE INDEX request__sender__network_id__created_at ON request(sender, network_id, created_at); | ||
| CREATE INDEX request__sender__state__created_at ON request(sender, state, created_at); | ||
| CREATE INDEX request__sender__created_at ON request(sender, created_at); | ||
| CREATE INDEX request__sequence__network_id__state__created_at ON request(sequence, network_id, state, created_at); | ||
| CREATE INDEX request__sequence__network_id__created_at ON request(sequence, network_id, created_at); | ||
| CREATE INDEX request__sequence__state__created_at ON request(sequence, state, created_at); | ||
| CREATE INDEX request__sequence__created_at ON request(sequence, created_at); | ||
| CREATE INDEX request__state__created_at ON request(state, created_at); | ||
| CREATE INDEX request__created_at ON request(created_at); | ||
|
|
||
| CREATE INDEX request__request_tx_hash ON request (request_tx_hash) WHERE request_tx_hash IS NOT NULL; | ||
| CREATE INDEX request__reveal_tx_hash ON request (reveal_tx_hash) WHERE reveal_tx_hash IS NOT NULL; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 seems abandoned (from sqlx docs), can you use dotenvy?