lib/bitcoin/storage/sequel/migrations/002_tx.rb in bitcoin-ruby-0.0.3 vs lib/bitcoin/storage/sequel/migrations/002_tx.rb in bitcoin-ruby-0.0.4

- old
+ new

@@ -1,10 +1,10 @@ Sequel.migration do up do - $stdout.puts "Running migration #{__FILE__}" + @log.info { "Running migration #{__FILE__}" } next if tables.include?(:tx) create_table :tx do primary_key :id @@ -37,14 +37,9 @@ column :tx_idx, :int, :null => false column :pk_script, (@db.adapter_scheme == :postgres ? :bytea : :blob), :null => false column :value, :bigint column :type, :int, :null => false, :index => true end - - create_view(:unconfirmed, - "SELECT * FROM tx WHERE NOT EXISTS " + - "(SELECT 1 FROM blk_tx WHERE blk_tx.tx_id = tx.id)" + - "ORDER BY tx.id DESC") end end