Sha256: dd67c9792becb745ccfd8621fa04d65b3c8c3356b7a0ce372b82531280bc2d06

Contents?: true

Size: 434 Bytes

Versions: 3

Compression:

Stored size: 434 Bytes

Contents

Sequel.migration do

  up do

    @log.info { "Running migration #{__FILE__}" }

    if adapter_scheme == :postgres
      add_column :txin, :tmp_prev_out, :bytea
      self[:txin].where.update("tmp_prev_out = prev_out::bytea")
      drop_column :txin, :prev_out
      add_column :txin, :prev_out, :bytea, index: true
      self[:txin].where.update("prev_out = tmp_prev_out")
      drop_column :txin, :tmp_prev_out
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bitcoin-ruby-0.0.6 lib/bitcoin/storage/sequel/migrations/004_change_txin_prev_out_to_blob.rb
bitcoin-ruby-0.0.5 lib/bitcoin/storage/sequel/migrations/004_change_txin_prev_out_to_blob.rb
bitcoin-ruby-0.0.4 lib/bitcoin/storage/sequel/migrations/004_change_txin_prev_out_to_blob.rb