Skip to content

Commit

Permalink
Use LOWER + LIKE instead of ILIKE since SQLite doesn't have ILIKE
Browse files Browse the repository at this point in the history
  • Loading branch information
dbackeus committed Jun 19, 2024
1 parent 7affec1 commit 787dc13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/clusters_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def kubeconfig

first_control_plane = @cluster.servers
.where.associated(:machine_config)
.where("name ILIKE '%control-plane%'")
.where("LOWER(name) LIKE '%control-plane%'")
.order(name: :asc)
.first

Expand Down
2 changes: 1 addition & 1 deletion app/models/cluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Cluster < ApplicationRecord
def talosconfig
first_control_plane = servers
.where.associated(:machine_config)
.where("name ILIKE '%control-plane%'")
.where("LOWER(name) LIKE '%control-plane%'")
.order(name: :asc)
.first

Expand Down

0 comments on commit 787dc13

Please sign in to comment.