Sha256: 1d2d0f2e04ca0f9904996f5496922dc60eeaef8142d26084e1d30e5ace89599e

Contents?: true

Size: 774 Bytes

Versions: 13

Compression:

Stored size: 774 Bytes

Contents

require 'spec_helper'

class IndexKing < ::ActiveRecord::Migration
  def self.drop_kings
    if table_exists?(:kings)
      drop_table :kings
    end
  end

  def self.up
    create_table :kings do |t|
      t.string :king_name_to_not_have_only_auto_increment_columns
    end
  end

  def self.down
    drop_table :kings
  end
end

# Vertica does not support "indexing" it uses Projections
# and those must be created differently
#
describe IndexKing do
  def connection
    ::ActiveRecord::Base.connection
  end

  before do
    IndexKing.drop_kings
  end

  describe "#index_exists?" do
    it "always says false" do
      connection.index_exists?(:kings, :id).must_equal(false)
      connection.index_exists?(:kings, [ :id, :not_id ]).must_equal(false)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
activerecord-jdbcvertica-adapter-0.3.0.pre1 spec/migrations/index_spec.rb
activerecord-jdbcvertica-adapter-0.3.0.pre0 spec/migrations/index_spec.rb
activerecord-jdbcvertica-adapter-0.2.0 spec/migrations/index_spec.rb
activerecord-jdbcvertica-adapter-0.1.2 spec/migrations/index_spec.rb
activerecord-jdbcvertica-adapter-0.1.1 spec/migrations/index_spec.rb
activerecord-jdbcvertica-adapter-0.1.0 spec/migrations/index_spec.rb
activerecord-jdbcvertica-adapter-0.0.9 spec/migrations/index_spec.rb
activerecord-jdbcvertica-adapter-0.0.8 spec/migrations/index_spec.rb
activerecord-jdbcvertica-adapter-0.0.7 spec/migrations/index_spec.rb
activerecord-jdbcvertica-adapter-0.0.6 spec/migrations/index_spec.rb
activerecord-jdbcvertica-adapter-0.0.5 spec/migrations/index_spec.rb
activerecord-jdbcvertica-adapter-0.0.4 spec/migrations/index_spec.rb
activerecord-jdbcvertica-adapter-0.0.3 spec/migrations/index_spec.rb