Skip to content

Commit ecbbb0f

Browse files
author
stefano galassi
committed
#20 added timestamp to transaction table and simplified mempool table structure
1 parent 3d4119b commit ecbbb0f

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

common/database/migration.go

+4-11
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,9 @@ func (m *Migration) Init(query *query.Executor) error {
4242
`
4343
CREATE TABLE IF NOT EXISTS "mempool" (
4444
"id" BLOB,
45-
"sender_account_type" INTEGER,
46-
"sender_account" TEXT,
47-
"recipient_account_type" INTEGER,
48-
"recipient_account" TEXT,
49-
"transaction_type" INTEGER,
50-
"fee" INTEGER,
51-
"timestamp" INTEGER,
52-
"transaction_hash" BLOB,
53-
"transaction_body_length" INTEGER,
54-
"transaction_body_bytes" BLOB,
55-
"signature" BLOB,
45+
"fee_per_byte" INTEGER,
46+
"arrival_timestamp" INTEGER,
47+
"transaction_bytes" BLOB,
5648
PRIMARY KEY("id")
5749
);`,
5850
`
@@ -64,6 +56,7 @@ func (m *Migration) Init(query *query.Executor) error {
6456
"recipient_account_id" BLOB,
6557
"transaction_type" INTEGER,
6658
"fee" INTEGER,
59+
"timestamp" INTEGER,
6760
"transaction_hash" BLOB,
6861
"transaction_body_length" INTEGER,
6962
"transaction_body_bytes" BLOB,

0 commit comments

Comments
 (0)