Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

chore: create permit table and move data #817

Open
wants to merge 16 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions supabase/migrations/20230923153903_new_permit.sql
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_at timestamptz not null,
updated_at timestamptz not null,
network smallserial not null,
token char(42) not null,
amount numeric not null,
nonce numeric not null,
0x4007 marked this conversation as resolved.
Show resolved Hide resolved
deadline numeric not null,
beneficiary char(42) not null,
owner char(42) not null,
signature char(132) not null
);

INSERT INTO
new_permits (
id,
created_at,
updated_at,
seprintour marked this conversation as resolved.
Show resolved Hide resolved
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;
2 changes: 2 additions & 0 deletions supabase/migrations/20230923182214_fix_debit.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE Debits
ALTER COLUMN amount TYPE NUMERIC;
Loading