You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1005 B

4 years ago
4 years ago
4 years ago
4 years ago
  1. -- +migrate Up
  2. CREATE TABLE tx_pool (
  3. tx_id BYTEA PRIMARY KEY,
  4. from_idx BIGINT NOT NULL,
  5. to_idx BIGINT NOT NULL,
  6. to_eth_addr BYTEA NOT NULL,
  7. to_bjj BYTEA NOT NULL,
  8. token_id INT NOT NULL,
  9. amount BYTEA NOT NULL,
  10. amount_f NUMERIC NOT NULL,
  11. value_usd NUMERIC,
  12. fee SMALLINT NOT NULL,
  13. nonce BIGINT NOT NULL,
  14. state CHAR(4) NOT NULL,
  15. signature BYTEA NOT NULL,
  16. timestamp TIMESTAMP WITHOUT TIME ZONE NOT NULL,
  17. batch_num BIGINT,
  18. rq_from_idx BIGINT,
  19. rq_to_idx BIGINT,
  20. rq_to_eth_addr BYTEA,
  21. rq_to_bjj BYTEA,
  22. rq_token_id INT,
  23. rq_amount BYTEA,
  24. rq_fee SMALLINT,
  25. rq_nonce BIGINT,
  26. fee_usd NUMERIC,
  27. usd_update TIMESTAMP WITHOUT TIME ZONE,
  28. tx_type VARCHAR(40) NOT NULL
  29. );
  30. CREATE TABLE account_creation_auth (
  31. eth_addr BYTEA PRIMARY KEY,
  32. bjj BYTEA NOT NULL,
  33. signature BYTEA NOT NULL,
  34. timestamp TIMESTAMP WITHOUT TIME ZONE NOT NULL
  35. );
  36. -- +migrate Down
  37. DROP TABLE account_creation_auth;
  38. DROP TABLE tx_pool;