You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following runs fine in postgres, but when part of a migration in a .sql file, I get the error "error: function update_trigger_status() does not exist":
CREATE FUNCTION update_trigger_status()
RETURNS TRIGGER AS $$
BEGIN
NEW.last_active_flip := CASE WHEN NEW.active <> OLD.active AND NEW.active = 't' THEN now()
ELSE OLD.last_active_flip END;
NEW.last_inactive_flip := CASE WHEN NEW.active <> OLD.active AND NEW.active = 'f' THEN now()
ELSE OLD.last_inactive_flip END;
RETURN NEW;
END;
$$ language 'plpgsql';
The following runs fine in postgres, but when part of a migration in a .sql file, I get the error "error: function update_trigger_status() does not exist":
node-db-migrate version: 0.10.0-beta.23
db-migrate-pg version: 0.2.5
tried other delimiters, didn't work. The plpgsql extension is installed.
The text was updated successfully, but these errors were encountered: