This repository was archived by the owner on Sep 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 87
chore: create permit table and move data #817
Open
seprintour
wants to merge
16
commits into
ubiquity:development
Choose a base branch
from
seprintour:db-schema-permits
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
bfc9787
chore: create permit table and move data
seprintour d079892
Merge branch 'development' into db-schema-permits
seprintour e26a673
chore: save permit to db
seprintour 23977fe
chore: permit fully setup
seprintour 07ad345
chore: remove all _at suffix
seprintour 5f46f79
Merge branch 'development' into db-schema-permits
seprintour 5b24732
Merge branch 'development' into db-schema-permits
seprintour 1c2c3e0
Merge branch 'development' into db-schema-permits
seprintour e862a31
Merge branch 'development' into db-schema-permits
seprintour d22538c
Merge branch 'development' into db-schema-permits
seprintour f20f77e
chore: fix new changes error
seprintour 0af0353
Merge branch 'development' into db-schema-permits
seprintour 769a7b6
Merge branch 'development' into db-schema-permits
seprintour 3d15f7b
chore: fix warning
cuddle-dev ca1edbc
chore: text with checks
seprintour 3d46590
Merge branch 'development' into db-schema-permits
seprintour 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
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
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,48 @@ | ||
| CREATE TABLE IF NOT EXISTS | ||
| new_permits ( | ||
| id serial primary key, | ||
| created timestamptz not null, | ||
| updated timestamptz not null, | ||
| network smallserial not null, | ||
| token text check (char_length(token) = 42) not null, | ||
| amount numeric not null, | ||
| nonce numeric not null, | ||
|
0x4007 marked this conversation as resolved.
|
||
| deadline numeric not null, | ||
| beneficiary text check (char_length(beneficiary) = 42) not null, | ||
| owner text check (char_length(owner) = 42) not null, | ||
| signature text check (char_length(signature) = 132) not null | ||
| ); | ||
|
|
||
| INSERT INTO | ||
| new_permits ( | ||
| id, | ||
| created, | ||
| updated, | ||
| network, | ||
| token, | ||
| amount, | ||
| nonce, | ||
| deadline, | ||
| beneficiary, | ||
| owner, | ||
| signature | ||
| ) | ||
| SELECT | ||
| id, | ||
| created_at, | ||
| created_at, | ||
| network_id, | ||
| token_address, | ||
| CAST(payout_amount AS numeric), | ||
| CAST(nonce AS numeric), | ||
| CAST(deadline AS numeric), | ||
| bounty_hunter_address, | ||
| wallet_owner_address, | ||
| signature | ||
| FROM | ||
| permits; | ||
|
|
||
| DROP TABLE permits; | ||
|
|
||
| ALTER TABLE new_permits | ||
| RENAME TO permits; | ||
|
seprintour marked this conversation as resolved.
|
||
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,8 @@ | ||
| ALTER TABLE Debits | ||
| ALTER COLUMN amount TYPE NUMERIC; | ||
|
|
||
| ALTER TABLE Debits | ||
| RENAME COLUMN created_at TO created; | ||
|
|
||
| ALTER TABLE Debits | ||
| RENAME COLUMN updated_at TO updated; |
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.
Uh oh!
There was an error while loading. Please reload this page.