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.

36 lines
947 B

  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. fee SMALLINT NOT NULL,
  11. nonce BIGINT NOT NULL,
  12. state CHAR(4) NOT NULL,
  13. batch_num BIGINT,
  14. rq_from_idx BIGINT,
  15. rq_to_idx BIGINT,
  16. rq_to_eth_addr BYTEA,
  17. rq_to_bjj BYTEA,
  18. rq_token_id INT,
  19. rq_amount BYTEA,
  20. rq_fee SMALLINT,
  21. rq_nonce BIGINT,
  22. signature BYTEA NOT NULL,
  23. timestamp TIMESTAMP WITHOUT TIME ZONE NOT NULL,
  24. absolute_fee NUMERIC,
  25. absolute_fee_update TIMESTAMP WITHOUT TIME ZONE
  26. );
  27. CREATE TABLE account_creation_auth (
  28. eth_addr BYTEA PRIMARY KEY,
  29. bjj BYTEA NOT NULL,
  30. account_creation_auth_sig BYTEA NOT NULL,
  31. timestamp TIMESTAMP WITHOUT TIME ZONE NOT NULL
  32. );
  33. -- +migrate Down
  34. DROP TABLE account_creation_auth;
  35. DROP TABLE tx_pool;