Sha256: 051863650c1414ceb064a09efb44abe51da43625c27a0daa73529aff3b8972cb

Contents?: true

Size: 436 Bytes

Versions: 2

Compression:

Stored size: 436 Bytes

Contents

Sequel.migration do

  up do

    $stdout.puts "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

2 entries across 2 versions & 1 rubygems

Version Path
bitcoin-ruby-0.0.3 lib/bitcoin/storage/sequel/migrations/003_change_txin_script_sig_to_blob.rb
bitcoin-ruby-0.0.2 lib/bitcoin/storage/sequel/migrations/003_change_txin_script_sig_to_blob.rb