mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-04-23 03:00:50 -04:00
27 lines
687 B
SQL
27 lines
687 B
SQL
-- +goose Up
|
|
-- +goose StatementBegin
|
|
|
|
create table transaction
|
|
(
|
|
id VARCHAR NOT NULL,
|
|
tx_hash VARCHAR NOT NULL,
|
|
sender VARCHAR NOT NULL,
|
|
nonce BIGINT NOT NULL,
|
|
target VARCHAR DEFAULT '',
|
|
value VARCHAR NOT NULL,
|
|
data BYTEA DEFAULT NULL,
|
|
created_time TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP
|
|
);
|
|
|
|
create unique index transaction_id_uindex
|
|
on transaction (id);
|
|
|
|
create unique index transaction_tx_hash_uindex
|
|
on transaction (tx_hash);
|
|
|
|
-- +goose StatementEnd
|
|
|
|
-- +goose Down
|
|
-- +goose StatementBegin
|
|
drop table if exists transaction;
|
|
-- +goose StatementEnd |