Skip to content

Commit

Permalink
fix: Escape table_prefix with double quotes (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
ravensiris authored Jan 1, 2025
1 parent 51a9194 commit fe7ea75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/carbonite/migrations.ex
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ defmodule Carbonite.Migrations do
"""
CREATE CONSTRAINT TRIGGER capture_changes_into_#{carbonite_prefix}_trigger
AFTER INSERT OR UPDATE OR DELETE
ON #{table_prefix}.#{table_name}
ON "#{table_prefix}".#{table_name}
DEFERRABLE INITIALLY #{initially}
FOR EACH ROW
EXECUTE PROCEDURE #{carbonite_prefix}.capture_changes();
Expand Down Expand Up @@ -183,7 +183,7 @@ defmodule Carbonite.Migrations do

"""
DROP TRIGGER capture_changes_into_#{carbonite_prefix}_trigger
ON #{table_prefix}.#{table_name};
ON "#{table_prefix}".#{table_name};
"""
|> squish_and_execute()

Expand Down

0 comments on commit fe7ea75

Please sign in to comment.