View Source StructureSqlFormatter (structure_sql_formatter v1.0.1)

Summary

Functions

Formats structure.sql to make the git diff easier to read.

Functions

Formats structure.sql to make the git diff easier to read.

Options

The StructureSqlFormatter options are:

  • :remove_trailing_whitespace (boolean/0) - Remove trailing whitespace. The default value is true.

  • :remove_version_specific_output (boolean/0) - Don't output the postgres version used in the dump. Also remove some specific queries for different versions. The default value is true.

  • :remove_useless_comment_lines (boolean/0) - Remove -- comments. The default value is true.

  • :remove_pg_stat_statements_extension (boolean/0) - Remove pg_stat_statements extension (its not relevant to the code). The default value is true.

  • :remove_pg_buffercache_extension (boolean/0) - Remove pg_buffercache extension (its not relevant to the code). The default value is true.

  • :remove_comments_on_extensions (boolean/0) - Remove COMMENT ON EXTENSION parts. The default value is true.

  • :remove_useless_version_specific_parts_of_comments (boolean/0) - Remove Schema: xxx; Owner; yyy parts. The default value is true.

  • :reduce_noise_for_id_fields (boolean/0) - Reduce noise for id fields by making them SERIAL instead of integer+sequence stuff. This is a bit optimistic, but works as long as you don't have an id field thats not a sequence/uuid. The default value is false.

  • :remove_inherited_tables (boolean/0) - Remove inherited tables. The default value is false.

  • :remove_partitioned_tables (boolean/0) - Remove partitioned tables. The default value is false.

  • :allow_restoring_postgres_11_output_on_postgres_10 (boolean/0) - Makes dump from postgres 11 compatible for postgres 10. The default value is true.

  • :order_schema_migrations_values (boolean/0) - Cleanup of schema_migrations values to prevent merge conflicts:

    • sorts all values chronological
    • places the comma's in front of each value (except for the first)
    • places the semicolon on a separate last line The default value is false.