Class: Istox::CreateBlockchainReceipts

Inherits:
Object
  • Object
show all
Defined in:
lib/istox/migrations/create_blockchain_receipts.rb

Instance Method Summary collapse

Constructor Details

#initialize(_, _, table_name = nil) ⇒ CreateBlockchainReceipts

Returns a new instance of CreateBlockchainReceipts.



3
4
5
6
7
8
# File 'lib/istox/migrations/create_blockchain_receipts.rb', line 3

def initialize(_, _, table_name = nil)
    @table_name = table_name
    unless @table_name
        @table_name = :blockchain_receipts
    end
end

Instance Method Details

#changeObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/istox/migrations/create_blockchain_receipts.rb', line 10

def change
    create_table @table_name do |t|
        t.string :txid
        t.string :txhash
        t.integer :resource_id
        t.string :resource_action
        t.string :resource_name
        t.boolean :resource_handled
        t.datetime :deleted_at, index: true
        t.timestamps
        t.string :sid
        t.integer :lock_version
    end
end