Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -914,10 +914,6 @@ def pk_and_sequence_for(table_name, owner = nil, desc_table_name = nil) # :nodoc
end
end

def has_primary_key?(table_name, owner = nil, desc_table_name = nil) # :nodoc:
primary_keys(table_name).any?
end

def primary_keys(table_name) # :nodoc:
(_owner, desc_table_name) = resolve_data_source_name(table_name)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@
schema_define { drop_table :test_no_pks, if_exists: true }
end

it "has_primary_key? returns true for a composite-PK table" do
expect(@conn.has_primary_key?("uber_barcodes")).to be true
end

it "pk_and_sequence_for returns nil for a composite-PK table" do
expect(@conn.pk_and_sequence_for("uber_barcodes")).to be_nil
end
Expand Down