Sha256: ba0f022072889072819d7080e4cc5d7cd17b4a71effad6506b31ff4f4ed98aa5

Contents?: true

Size: 437 Bytes

Versions: 3

Compression:

Stored size: 437 Bytes

Contents

Sequel.migration do

  up do

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

    if adapter_scheme == :postgres
      add_column :txin, :tmp_script_sig, :bytea
      self[:txin].where.update("tmp_script_sig = script_sig::bytea")
      drop_column :txin, :script_sig
      add_column :txin, :script_sig, :bytea
      self[:txin].where.update("script_sig = tmp_script_sig")
      drop_column :txin, :tmp_script_sig
    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/003_change_txin_script_sig_to_blob.rb
bitcoin-ruby-0.0.5 lib/bitcoin/storage/sequel/migrations/003_change_txin_script_sig_to_blob.rb
bitcoin-ruby-0.0.4 lib/bitcoin/storage/sequel/migrations/003_change_txin_script_sig_to_blob.rb