Skip to content

Commit

Permalink
Add blank line after create_function in schema (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielwestendorf authored Oct 23, 2024
1 parent a4c696a commit b76c783
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/clickhouse-activerecord/schema_dumper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,11 @@ def table(table, stream)
def function(function, stream)
stream.puts " # FUNCTION: #{function}"
sql = @connection.show_create_function(function)
stream.puts " # SQL: #{sql}" if sql
stream.puts " create_function \"#{function}\", \"#{sql.gsub(/^CREATE FUNCTION (.*?) AS/, '').strip}\", force: true" if sql
if sql
stream.puts " # SQL: #{sql}"
stream.puts " create_function \"#{function}\", \"#{sql.gsub(/^CREATE FUNCTION (.*?) AS/, '').strip}\", force: true"
stream.puts
end
end

def format_options(options)
Expand Down

0 comments on commit b76c783

Please sign in to comment.