class TestingMigration < ActiveRecord::Migration
def change
change_table :foo do |t|
t.index(
expression: "bar, (baz->>'wizzle')",
name: 'idx_test'
)
end
end
end
will run this SQL command
CREATE INDEX "idx_test" ON "foo" (bar, (baz->>'wizzle'))
but will add this incomplete directive to the schema:
# expression was dropped!
add_index "foo", ["bar"], name: "idx_test"
The expected result is that we instead get something like
Running this migration
will run this SQL command
but will add this incomplete directive to the schema:
The expected result is that we instead get something like
in the schema.