lib/chrono_model/adapter/ddl.rb in chrono_model-2.0.0 vs lib/chrono_model/adapter/ddl.rb in chrono_model-3.0.1

- old
+ new

@@ -80,11 +80,11 @@ # # The serial sequence is invoked manually only if the PK is NULL, to # allow setting the PK to a specific value (think migration scenario). # def chrono_create_INSERT_trigger(table, pk, current, history, fields, values) - execute <<-SQL.strip_heredoc # rubocop:disable Rails/SquishedSQLHeredocs + execute <<-SQL.strip_heredoc # rubocop:disable Rails/SquishedSQLHeredocs,Rails/StripHeredoc CREATE OR REPLACE FUNCTION chronomodel_#{table}_insert() RETURNS TRIGGER AS $$ BEGIN #{insert_sequence_sql(pk, current)} INTO #{current} ( #{pk}, #{fields} ) VALUES ( NEW.#{pk}, #{values} ); @@ -133,11 +133,11 @@ columns - [quote_column_name('updated_at')] end journal &= columns - execute <<-SQL.strip_heredoc # rubocop:disable Rails/SquishedSQLHeredocs + execute <<-SQL.strip_heredoc # rubocop:disable Rails/SquishedSQLHeredocs,Rails/StripHeredoc CREATE OR REPLACE FUNCTION chronomodel_#{table}_update() RETURNS TRIGGER AS $$ DECLARE _now timestamp; DECLARE _hid integer; DECLARE _old record; DECLARE _new record; @@ -187,10 +187,10 @@ # data from the temporal table. # The first DELETE is required to remove history for records INSERTed and # DELETEd in the same transaction. # def chrono_create_DELETE_trigger(table, pk, current, history) - execute <<-SQL.strip_heredoc # rubocop:disable Rails/SquishedSQLHeredocs + execute <<-SQL.strip_heredoc # rubocop:disable Rails/SquishedSQLHeredocs,Rails/StripHeredoc CREATE OR REPLACE FUNCTION chronomodel_#{table}_delete() RETURNS TRIGGER AS $$ DECLARE _now timestamp; BEGIN _now := timezone('UTC', now());