squawk-cli 1.5.4__tar.gz → 1.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/Cargo.lock +1 -1
  2. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/PKG-INFO +5 -4
  3. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/Cargo.toml +1 -1
  4. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/README.md +4 -3
  5. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/src/config.rs +6 -6
  6. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/src/reporter.rs +10 -10
  7. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/lib.rs +24 -4
  8. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/adding_field_with_default.rs +14 -15
  9. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/adding_foreign_key_constraint.rs +4 -4
  10. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/adding_not_null_field.rs +10 -38
  11. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/adding_primary_key_constraint.rs +2 -2
  12. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/adding_required_field.rs +5 -5
  13. squawk_cli-1.6.0/linter/src/rules/ban_alter_domain_with_add_constraint.rs +71 -0
  14. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/ban_char_field.rs +2 -15
  15. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/ban_concurrent_index_creation_in_transaction.rs +3 -3
  16. squawk_cli-1.6.0/linter/src/rules/ban_create_domain_with_constraint.rs +64 -0
  17. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/ban_drop_column.rs +1 -1
  18. squawk_cli-1.5.4/linter/src/rules/bad_drop_database.rs → squawk_cli-1.6.0/linter/src/rules/ban_drop_database.rs +1 -1
  19. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/ban_drop_not_null.rs +1 -1
  20. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/ban_drop_table.rs +1 -1
  21. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/changing_column_type.rs +1 -1
  22. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/constraint_missing_not_valid.rs +18 -4
  23. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/disallow_unique_constraint.rs +6 -6
  24. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/mod.rs +6 -2
  25. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/prefer_big_int.rs +3 -3
  26. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/prefer_bigint_over_int.rs +2 -2
  27. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/prefer_bigint_over_smallint.rs +2 -2
  28. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/prefer_identity.rs +2 -2
  29. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/prefer_robust_stmts.rs +6 -6
  30. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/prefer_text_field.rs +3 -3
  31. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/prefer_timestamptz.rs +2 -2
  32. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/renaming_column.rs +1 -1
  33. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/renaming_table.rs +1 -1
  34. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/require_concurrent_index_creation.rs +3 -3
  35. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/require_concurrent_index_deletion.rs +1 -1
  36. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_not_null_field__test_rules__adding_field_that_is_not_nullable_in_version_11.snap +1 -1
  37. squawk_cli-1.5.4/linter/src/rules/snapshots/squawk_linter__rules__adding_not_null_field__test_rules__adding_field_that_is_not_nullable.snap → squawk_cli-1.6.0/linter/src/rules/snapshots/squawk_linter__rules__adding_not_null_field__test_rules__adding_field_that_is_not_nullable_without_default.snap +1 -1
  38. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_primary_key_constraint__test_rules__plain_primary_key-2.snap +1 -1
  39. squawk_cli-1.6.0/linter/src/rules/snapshots/squawk_linter__rules__ban_alter_domain_with_add_constraint__test_rules__ban_alter_domain_with_add_constraint_works.snap +21 -0
  40. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__ban_concurrent_index_creation_in_transaction__test_rules__adding_index_concurrently_in_transaction_with_assume_in_transaction_but_outside.snap +0 -1
  41. squawk_cli-1.6.0/linter/src/rules/snapshots/squawk_linter__rules__ban_create_domain_with_constraint__test_rules__ban_create_domain_with_constraint_works.snap +21 -0
  42. squawk_cli-1.5.4/linter/src/rules/snapshots/squawk_linter__rules__bad_drop_database__test_rules__ban_drop_database.snap → squawk_cli-1.6.0/linter/src/rules/snapshots/squawk_linter__rules__ban_drop_database__test_rules__ban_drop_database.snap +1 -1
  43. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__ban_drop_table__test_rules__ban_drop_table.snap +0 -1
  44. squawk_cli-1.6.0/linter/src/rules/snapshots/squawk_linter__rules__constraint_missing_not_valid__test_rules__regression_with_indexing_2.snap +5 -0
  45. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/transaction_nesting.rs +8 -8
  46. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/snapshots/squawk_linter__test_rules__rule_names_debug_snap.snap +3 -0
  47. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/snapshots/squawk_linter__test_rules__rule_names_display_snap.snap +3 -0
  48. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/versions.rs +3 -3
  49. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/violations.rs +4 -0
  50. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/ast.rs +22 -2
  51. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/parse.rs +125 -125
  52. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_domain_stmt.snap +29 -30
  53. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_alter_domain_stmt.snap +8 -9
  54. squawk_cli-1.6.0/parser/src/snapshots/squawk_parser__parse__tests__parse_sql_query_json_works.snap +139 -0
  55. squawk_cli-1.5.4/linter/src/rules/snapshots/squawk_linter__rules__ban_char_field__test_rules__regression_with_indexing_2.snap +0 -5
  56. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/Cargo.toml +0 -0
  57. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/src/file_finding.rs +0 -0
  58. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/src/main.rs +0 -0
  59. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/src/snapshots/squawk__config__test_config__load_assume_in_transaction.snap +0 -0
  60. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/src/snapshots/squawk__config__test_config__load_cfg_full.snap +0 -0
  61. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/src/snapshots/squawk__config__test_config__load_excluded_paths.snap +0 -0
  62. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/src/snapshots/squawk__config__test_config__load_excluded_rules.snap +0 -0
  63. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/src/snapshots/squawk__config__test_config__load_fail_on_violations.snap +0 -0
  64. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/src/snapshots/squawk__config__test_config__load_pg_version.snap +0 -0
  65. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/src/snapshots/squawk__reporter__test_check_files__check_files_invalid_syntax.snap +0 -0
  66. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/src/snapshots/squawk__reporter__test_github_comment__generating_comment_multiple_files.snap +0 -0
  67. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/src/snapshots/squawk__reporter__test_github_comment__generating_comment_no_violations.snap +0 -0
  68. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/src/snapshots/squawk__reporter__test_github_comment__generating_no_violations_no_files.snap +0 -0
  69. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/src/snapshots/squawk__reporter__test_reporter__display_no_violations_tty.snap +0 -0
  70. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/src/snapshots/squawk__reporter__test_reporter__display_violations_tty.snap +0 -0
  71. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/src/snapshots/squawk__reporter__test_reporter__span_offsets.snap +0 -0
  72. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/cli/src/subcommand.rs +0 -0
  73. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/github/Cargo.toml +0 -0
  74. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/github/README.md +0 -0
  75. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/github/src/actions.rs +0 -0
  76. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/github/src/app.rs +0 -0
  77. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/github/src/lib.rs +0 -0
  78. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/Cargo.toml +0 -0
  79. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/README.md +0 -0
  80. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/errors.rs +0 -0
  81. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/README.md +0 -0
  82. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/non_volatile_built_in_functions.txt +0 -0
  83. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_field_with_default__test_rules__add_numbers_ok.snap +0 -0
  84. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_field_with_default__test_rules__default_arbitrary_func_err.snap +0 -0
  85. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_field_with_default__test_rules__default_bool_ok.snap +0 -0
  86. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_field_with_default__test_rules__default_enum_ok.snap +0 -0
  87. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_field_with_default__test_rules__default_integer_ok.snap +0 -0
  88. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_field_with_default__test_rules__default_jsonb_ok.snap +0 -0
  89. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_field_with_default__test_rules__default_now_func_ok.snap +0 -0
  90. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_field_with_default__test_rules__default_random_with_args_err.snap +0 -0
  91. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_field_with_default__test_rules__default_str_ok.snap +0 -0
  92. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_field_with_default__test_rules__default_uuid_err.snap +0 -0
  93. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_field_with_default__test_rules__default_volatile_func_err.snap +0 -0
  94. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_field_with_default__test_rules__docs_example_bad.snap +0 -0
  95. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_field_with_default__test_rules__docs_example_ok.snap +0 -0
  96. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_field_with_default__test_rules__generated_stored.snap +0 -0
  97. /squawk_cli-1.5.4/linter/src/rules/snapshots/squawk_linter__rules__adding_not_null_field__test_rules__adding_field_that_is_not_nullable_without_default.snap → /squawk_cli-1.6.0/linter/src/rules/snapshots/squawk_linter__rules__adding_not_null_field__test_rules__adding_field_that_is_not_nullable.snap +0 -0
  98. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_not_null_field__test_rules__set_not_null.snap +0 -0
  99. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_primary_key_constraint__test_rules__plain_primary_key.snap +0 -0
  100. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_primary_key_constraint__test_rules__serial_primary_key.snap +0 -0
  101. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_required_field__test_rules__generated_stored.snap +0 -0
  102. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_required_field__test_rules__generated_stored_not_null.snap +0 -0
  103. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_required_field__test_rules__not_null_with_default.snap +0 -0
  104. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_required_field__test_rules__not_null_without_default.snap +0 -0
  105. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__adding_required_field__test_rules__nullable.snap +0 -0
  106. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__ban_char_field__test_rules__creating_table_with_char_errors.snap +0 -0
  107. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__ban_char_field__test_rules__creating_table_with_var_char_and_text_okay.snap +0 -0
  108. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__ban_concurrent_index_creation_in_transaction__test_rules__adding_index_concurrently_in_transaction-2.snap +0 -0
  109. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__ban_concurrent_index_creation_in_transaction__test_rules__adding_index_concurrently_in_transaction.snap +0 -0
  110. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__ban_concurrent_index_creation_in_transaction__test_rules__adding_index_concurrently_in_transaction_with_assume_in_transaction-2.snap +0 -0
  111. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__ban_concurrent_index_creation_in_transaction__test_rules__adding_index_concurrently_in_transaction_with_assume_in_transaction.snap +0 -0
  112. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__ban_drop_column__test_rules__drop_column.snap +0 -0
  113. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__ban_drop_not_null__test_rules__ban_drop_not_null.snap +0 -0
  114. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__changing_column_type__test_rules__changing_field_type-2.snap +0 -0
  115. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__changing_column_type__test_rules__changing_field_type.snap +0 -0
  116. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__constraint_missing_not_valid__test_rules__adding_check_constraint-2.snap +0 -0
  117. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__constraint_missing_not_valid__test_rules__adding_check_constraint.snap +0 -0
  118. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__constraint_missing_not_valid__test_rules__adding_foreign_key-2.snap +0 -0
  119. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__constraint_missing_not_valid__test_rules__adding_foreign_key.snap +0 -0
  120. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__constraint_missing_not_valid__test_rules__ensure_ignored_when_new_table.snap +0 -0
  121. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__constraint_missing_not_valid__test_rules__ensure_ignored_when_new_table_with_assume_in_transaction.snap +0 -0
  122. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__constraint_missing_not_valid__test_rules__not_valid_validate_in_transaction.snap +0 -0
  123. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__constraint_missing_not_valid__test_rules__not_valid_validate_with_assume_in_transaction.snap +0 -0
  124. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__constraint_missing_not_valid__test_rules__not_valid_validate_with_assume_in_transaction_with_explicit_commit.snap +0 -0
  125. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__disallow_unique_constraint__test_rules__adding_unique_constraint-2.snap +0 -0
  126. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__disallow_unique_constraint__test_rules__adding_unique_constraint-3.snap +0 -0
  127. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__disallow_unique_constraint__test_rules__adding_unique_constraint.snap +0 -0
  128. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__disallow_unique_constraint__test_rules__unique_constraint_inline_add_column.snap +0 -0
  129. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__disallow_unique_constraint__test_rules__unique_constraint_inline_add_column_unique.snap +0 -0
  130. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__prefer_big_int__test_rules__create_table_bad.snap +0 -0
  131. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__prefer_big_int__test_rules__create_table_many_errors.snap +0 -0
  132. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__prefer_bigint_over_int__test_rules__create_table_bad.snap +0 -0
  133. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__prefer_bigint_over_smallint__test_rules__create_table_bad.snap +0 -0
  134. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__prefer_identity__test_rules__prefer_identity_bad.snap +0 -0
  135. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__prefer_robust_stmts__test_rules__create_index_concurrently_unnamed.snap +0 -0
  136. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__prefer_robust_stmts__test_rules__disable_row_level_security.snap +0 -0
  137. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__prefer_robust_stmts__test_rules__enable_row_level_security.snap +0 -0
  138. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__prefer_robust_stmts__test_rules__enable_row_level_security_without_exists_check.snap +0 -0
  139. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__prefer_text_field__test_rules__adding_column_non_text.snap +0 -0
  140. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__prefer_timestamptz__test_rules__alter_table.snap +0 -0
  141. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__renaming_column__test_rules__renaming_column.snap +0 -0
  142. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__renaming_table__test_rules__renaming_table.snap +0 -0
  143. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__require_concurrent_index_creation__test_rules__adding_index_non_concurrently-2.snap +0 -0
  144. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__require_concurrent_index_creation__test_rules__adding_index_non_concurrently.snap +0 -0
  145. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__require_concurrent_index_creation__test_rules__ensure_ignored_when_new_table.snap +0 -0
  146. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__require_concurrent_index_creation__test_rules__ensure_ignored_when_new_table_with_assume_in_transaction.snap +0 -0
  147. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__transaction_nesting__test_rules__begin_repeated.snap +0 -0
  148. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__transaction_nesting__test_rules__begin_with_assume_in_transaction.snap +0 -0
  149. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__transaction_nesting__test_rules__commit_repeated.snap +0 -0
  150. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__transaction_nesting__test_rules__commit_with_assume_in_transaction.snap +0 -0
  151. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/snapshots/squawk_linter__rules__transaction_nesting__test_rules__rollback_with_assume_in_transaction.snap +0 -0
  152. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/test_utils.rs +0 -0
  153. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/rules/utils.rs +0 -0
  154. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/linter/src/snapshots/squawk_linter__versions__test_pg_version__parse.snap +0 -0
  155. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/Cargo.toml +0 -0
  156. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/README.md +0 -0
  157. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/error.rs +0 -0
  158. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/lib.rs +0 -0
  159. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__adding_index_non_concurrently.snap +0 -0
  160. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_column_default_with_function.snap +0 -0
  161. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_database_collation.snap +0 -0
  162. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_database_stmt.snap +0 -0
  163. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_default_privileges_stmt.snap +0 -0
  164. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_enum_stmt.snap +0 -0
  165. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_event_trigger_stmt.snap +0 -0
  166. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_extension_contents_stmt-2.snap +0 -0
  167. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_extension_contents_stmt.snap +0 -0
  168. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_foreign_data_wrapper.snap +0 -0
  169. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_foreign_server_stmt.snap +0 -0
  170. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_function_stmt.snap +0 -0
  171. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_object_depends_stmt.snap +0 -0
  172. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_op_class_stmt.snap +0 -0
  173. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_op_family_stmt.snap +0 -0
  174. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_operator_stmt.snap +0 -0
  175. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_policy_stmt-2.snap +0 -0
  176. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_policy_stmt.snap +0 -0
  177. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_publication.snap +0 -0
  178. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_role_set_stmt.snap +0 -0
  179. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_role_stmt.snap +0 -0
  180. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_sequence_stmt.snap +0 -0
  181. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_subscription_stmt.snap +0 -0
  182. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_system_stmt.snap +0 -0
  183. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_table_extension.snap +0 -0
  184. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_table_space_stmt.snap +0 -0
  185. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_ts_configuration_stmt.snap +0 -0
  186. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_ts_dictionary_stmt.snap +0 -0
  187. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__alter_user_mapping_stmt.snap +0 -0
  188. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__checkpoint.snap +0 -0
  189. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__close_portal_stmt.snap +0 -0
  190. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__cluster_stmt.snap +0 -0
  191. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__comment_on_stmt.snap +0 -0
  192. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__composite_type_stmt.snap +0 -0
  193. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_access_method_stmt.snap +0 -0
  194. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_cast_stmt.snap +0 -0
  195. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_conversion_stmt.snap +0 -0
  196. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_database_stmt.snap +0 -0
  197. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_enum_stmt.snap +0 -0
  198. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_event_trigger_stmt.snap +0 -0
  199. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_extension.snap +0 -0
  200. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_foreign_data_wrapper.snap +0 -0
  201. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_foreign_server_stmt.snap +0 -0
  202. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_foriegn_table_stmt.snap +0 -0
  203. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_function_stmt.snap +0 -0
  204. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_index_without_index_name.snap +0 -0
  205. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_op_class_stmt.snap +0 -0
  206. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_plang_stmt.snap +0 -0
  207. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_policy_stmt.snap +0 -0
  208. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_procedure_stmt.snap +0 -0
  209. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_publication_stmt.snap +0 -0
  210. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_range_stmt.snap +0 -0
  211. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_role_stmt.snap +0 -0
  212. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_sequence_stmt.snap +0 -0
  213. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_stats_stmt.snap +0 -0
  214. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_subscription_stmt.snap +0 -0
  215. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_table_as_stmt.snap +0 -0
  216. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_transform_stmt.snap +0 -0
  217. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_trigger_stmt.snap +0 -0
  218. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_user_mapping_stmt.snap +0 -0
  219. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__create_view_stmt.snap +0 -0
  220. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__deallocate_stmt.snap +0 -0
  221. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__declare_cursor_stmt.snap +0 -0
  222. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__define_stmt-2.snap +0 -0
  223. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__define_stmt-3.snap +0 -0
  224. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__define_stmt.snap +0 -0
  225. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__discard_stmt.snap +0 -0
  226. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__do_stmt.snap +0 -0
  227. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__drop_database_stmt.snap +0 -0
  228. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__drop_extension.snap +0 -0
  229. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__drop_index.snap +0 -0
  230. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__drop_owned_stmt.snap +0 -0
  231. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__drop_role_set_stmt.snap +0 -0
  232. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__drop_subscription_stmt.snap +0 -0
  233. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__drop_user_mapping_stmt.snap +0 -0
  234. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__error_paths.snap +0 -0
  235. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__execute_stmt.snap +0 -0
  236. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__explain_stmt.snap +0 -0
  237. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__fetch_stmt.snap +0 -0
  238. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__import_foreign_schema_stmt.snap +0 -0
  239. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__json_index_operator.snap +0 -0
  240. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__listen_stmt.snap +0 -0
  241. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__load_stmt.snap +0 -0
  242. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__lock_stmt.snap +0 -0
  243. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__migration.snap +0 -0
  244. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__notify_stmt.snap +0 -0
  245. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_alter_collation_stmt.snap +0 -0
  246. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_alter_constraint_regression.snap +0 -0
  247. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_alter_table_set_list.snap +0 -0
  248. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_attach_table_partition.snap +0 -0
  249. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_create_schema_stmt.snap +0 -0
  250. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_create_table_partition.snap +0 -0
  251. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_create_table_regression.snap +0 -0
  252. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_delete_stmt-2.snap +0 -0
  253. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_delete_stmt.snap +0 -0
  254. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_delete_stmt_2.snap +0 -0
  255. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_detach_table_partition.snap +0 -0
  256. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_func_call.snap +0 -0
  257. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_generated_column.snap +0 -0
  258. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_inh.snap +0 -0
  259. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_replica_identity_stmt.snap +0 -0
  260. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_set_operations_stmt-2.snap +0 -0
  261. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_set_operations_stmt.snap +0 -0
  262. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_set_operations_stmt_2.snap +0 -0
  263. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_sql_create_index.snap +0 -0
  264. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_sql_create_index_concurrently.snap +0 -0
  265. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_sql_create_unique_index_safe.snap +0 -0
  266. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parse_sql_query_json.snap +0 -0
  267. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parsing_copy_stmt.snap +0 -0
  268. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parsing_create_table.snap +0 -0
  269. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parsing_create_table_space_stmt.snap +0 -0
  270. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parsing_create_table_using_like.snap +0 -0
  271. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parsing_drop_table_space_stmt.snap +0 -0
  272. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parsing_grant_role.snap +0 -0
  273. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parsing_grant_stmt.snap +0 -0
  274. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parsing_insert_stmt.snap +0 -0
  275. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parsing_update_stmt.snap +0 -0
  276. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parsing_variable_set_stmt.snap +0 -0
  277. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__parsing_variable_show_stmt.snap +0 -0
  278. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__prepare_stmt.snap +0 -0
  279. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__reassign_owned_stmt.snap +0 -0
  280. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__refresh_material_view_stmt.snap +0 -0
  281. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__regression_update_table.snap +0 -0
  282. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__reindex_stmt.snap +0 -0
  283. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__rule_stmt.snap +0 -0
  284. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__security_label_stmt.snap +0 -0
  285. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__select_one.snap +0 -0
  286. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__select_string_literal.snap +0 -0
  287. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__set_constraints.snap +0 -0
  288. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__span_with_indent.snap +0 -0
  289. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__span_with_new_line_and_indent.snap +0 -0
  290. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__truncate_stmt.snap +0 -0
  291. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__unlisten_stmt.snap +0 -0
  292. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/parser/src/snapshots/squawk_parser__parse__tests__vacuum_stmt.snap +0 -0
  293. {squawk_cli-1.5.4 → squawk_cli-1.6.0}/pyproject.toml +0 -0
@@ -1586,7 +1586,7 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
1586
1586
 
1587
1587
  [[package]]
1588
1588
  name = "squawk"
1589
- version = "1.5.4"
1589
+ version = "1.6.0"
1590
1590
  dependencies = [
1591
1591
  "atty",
1592
1592
  "base64 0.12.3",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: squawk-cli
3
- Version: 1.5.4
3
+ Version: 1.6.0
4
4
  Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
5
5
  Classifier: Operating System :: MacOS
6
6
  Classifier: Operating System :: Microsoft :: Windows
@@ -193,13 +193,13 @@ See the ["GitHub Integration" docs](https://squawkhq.com/docs/github_app) for mo
193
193
  Integrate Squawk into Git workflow with [pre-commit](https://pre-commit.com/). Add the following
194
194
  to your project's `.pre-commit-config.yaml`:
195
195
 
196
- ```
196
+ ```yaml
197
197
  repos:
198
198
  - repo: https://github.com/sbdchd/squawk
199
199
  rev: v0.10.0
200
200
  hooks:
201
- - id: squawk
202
- files: path/to/postres/migrations/written/in/sql
201
+ - id: squawk
202
+ files: path/to/postgres/migrations/written/in/sql
203
203
  ```
204
204
 
205
205
  Note the `files` parameter as it specifies the location of the files to be linted.
@@ -217,6 +217,7 @@ Note the `files` parameter as it specifies the location of the files to be linte
217
217
  - <https://github.com/AdmTal/PostgreSQL-Query-Lock-Explainer>
218
218
  - <https://github.com/stripe/pg-schema-diff>
219
219
  - <https://github.com/kristiandupont/schemalint>
220
+ - <https://github.com/supabase-community/postgres-language-server>
220
221
 
221
222
  ## related blog posts / SE Posts / PG Docs
222
223
 
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "squawk"
3
- version = "1.5.4"
3
+ version = "1.6.0"
4
4
  authors = ["Steve Dignam <steve@dignam.xyz>"]
5
5
  edition = "2018"
6
6
  license = "GPL-3.0"
@@ -173,13 +173,13 @@ See the ["GitHub Integration" docs](https://squawkhq.com/docs/github_app) for mo
173
173
  Integrate Squawk into Git workflow with [pre-commit](https://pre-commit.com/). Add the following
174
174
  to your project's `.pre-commit-config.yaml`:
175
175
 
176
- ```
176
+ ```yaml
177
177
  repos:
178
178
  - repo: https://github.com/sbdchd/squawk
179
179
  rev: v0.10.0
180
180
  hooks:
181
- - id: squawk
182
- files: path/to/postres/migrations/written/in/sql
181
+ - id: squawk
182
+ files: path/to/postgres/migrations/written/in/sql
183
183
  ```
184
184
 
185
185
  Note the `files` parameter as it specifies the location of the files to be linted.
@@ -197,6 +197,7 @@ Note the `files` parameter as it specifies the location of the files to be linte
197
197
  - <https://github.com/AdmTal/PostgreSQL-Query-Lock-Explainer>
198
198
  - <https://github.com/stripe/pg-schema-diff>
199
199
  - <https://github.com/kristiandupont/schemalint>
200
+ - <https://github.com/supabase-community/postgres-language-server>
200
201
 
201
202
  ## related blog posts / SE Posts / PG Docs
202
203
 
@@ -104,7 +104,7 @@ mod test_config {
104
104
  use super::*;
105
105
 
106
106
  #[test]
107
- fn test_load_cfg_full() {
107
+ fn load_cfg_full() {
108
108
  let squawk_toml = NamedTempFile::new().expect("generate tempFile");
109
109
  let file = r#"
110
110
  pg_version = "19.1"
@@ -117,7 +117,7 @@ assume_in_transaction = true
117
117
  assert_debug_snapshot!(Config::parse(Some(squawk_toml.path().to_path_buf())));
118
118
  }
119
119
  #[test]
120
- fn test_load_pg_version() {
120
+ fn load_pg_version() {
121
121
  let squawk_toml = NamedTempFile::new().expect("generate tempFile");
122
122
  let file = r#"
123
123
  pg_version = "19.1"
@@ -127,7 +127,7 @@ pg_version = "19.1"
127
127
  assert_debug_snapshot!(Config::parse(Some(squawk_toml.path().to_path_buf())));
128
128
  }
129
129
  #[test]
130
- fn test_load_excluded_rules() {
130
+ fn load_excluded_rules() {
131
131
  let squawk_toml = NamedTempFile::new().expect("generate tempFile");
132
132
  let file = r#"
133
133
  excluded_rules = ["require-concurrent-index-creation"]
@@ -137,7 +137,7 @@ excluded_rules = ["require-concurrent-index-creation"]
137
137
  assert_debug_snapshot!(Config::parse(Some(squawk_toml.path().to_path_buf())));
138
138
  }
139
139
  #[test]
140
- fn test_load_excluded_paths() {
140
+ fn load_excluded_paths() {
141
141
  let squawk_toml = NamedTempFile::new().expect("generate tempFile");
142
142
  let file = r#"
143
143
  excluded_paths = ["example.sql"]
@@ -147,7 +147,7 @@ excluded_paths = ["example.sql"]
147
147
  assert_debug_snapshot!(Config::parse(Some(squawk_toml.path().to_path_buf())));
148
148
  }
149
149
  #[test]
150
- fn test_load_assume_in_transaction() {
150
+ fn load_assume_in_transaction() {
151
151
  let squawk_toml = NamedTempFile::new().expect("generate tempFile");
152
152
  let file = r"
153
153
  assume_in_transaction = false
@@ -157,7 +157,7 @@ assume_in_transaction = false
157
157
  assert_debug_snapshot!(Config::parse(Some(squawk_toml.path().to_path_buf())));
158
158
  }
159
159
  #[test]
160
- fn test_load_fail_on_violations() {
160
+ fn load_fail_on_violations() {
161
161
  let squawk_toml = NamedTempFile::new().expect("generate tempFile");
162
162
  let file = r"
163
163
  [upload_to_github]
@@ -556,7 +556,7 @@ mod test_github_comment {
556
556
  /// Most cases, hopefully, will be a single migration for a given PR, but
557
557
  /// let's check the case of multiple migrations
558
558
  #[test]
559
- fn test_generating_comment_multiple_files() {
559
+ fn generating_comment_multiple_files() {
560
560
  let violations = vec![ViolationContent {
561
561
  filename: "alpha.sql".into(),
562
562
  sql: r"
@@ -588,7 +588,7 @@ SELECT 1;
588
588
  /// Even when we don't have violations we still want to output the SQL for
589
589
  /// easy human reading.
590
590
  #[test]
591
- fn test_generating_comment_no_violations() {
591
+ fn generating_comment_no_violations() {
592
592
  let violations = vec![
593
593
  ViolationContent {
594
594
  filename: "alpha.sql".into(),
@@ -623,7 +623,7 @@ ALTER TABLE "core_recipe" ADD COLUMN "foo" integer DEFAULT 10;
623
623
  /// Ideally the logic won't leave a comment when there are no migrations but
624
624
  /// better safe than sorry
625
625
  #[test]
626
- fn test_generating_no_violations_no_files() {
626
+ fn generating_no_violations_no_files() {
627
627
  let violations = vec![];
628
628
 
629
629
  let body = get_comment_body(&violations, "0.2.3");
@@ -642,7 +642,7 @@ mod test_check_files {
642
642
  use super::process_violations;
643
643
 
644
644
  #[test]
645
- fn test_check_files_invalid_syntax() {
645
+ fn check_files_invalid_syntax() {
646
646
  let sql = r"
647
647
  select \;
648
648
  ";
@@ -672,7 +672,7 @@ mod test_reporter {
672
672
  }
673
673
 
674
674
  #[test]
675
- fn test_display_violations_gcc() {
675
+ fn display_violations_gcc() {
676
676
  let sql = r#"
677
677
  ALTER TABLE "core_recipe" ADD COLUMN "foo" integer NOT NULL;
678
678
  ALTER TABLE "core_foo" ADD COLUMN "bar" integer NOT NULL;
@@ -698,7 +698,7 @@ SELECT 1;
698
698
  }
699
699
 
700
700
  #[test]
701
- fn test_display_violations_tty() {
701
+ fn display_violations_tty() {
702
702
  let sql = r#"
703
703
  ALTER TABLE "core_recipe" ADD COLUMN "foo" integer NOT NULL;
704
704
  ALTER TABLE "core_foo" ADD COLUMN "bar" integer NOT NULL;
@@ -719,7 +719,7 @@ SELECT 1;
719
719
  assert_display_snapshot!(strip_ansi_codes(&String::from_utf8_lossy(&buff)));
720
720
  }
721
721
  #[test]
722
- fn test_display_no_violations_tty() {
722
+ fn display_no_violations_tty() {
723
723
  let mut buff = Vec::new();
724
724
 
725
725
  let res = print_violations(
@@ -734,7 +734,7 @@ SELECT 1;
734
734
  }
735
735
 
736
736
  #[test]
737
- fn test_display_violations_json() {
737
+ fn display_violations_json() {
738
738
  let sql = r#"
739
739
  ALTER TABLE "core_recipe" ADD COLUMN "foo" integer NOT NULL;
740
740
  ALTER TABLE "core_foo" ADD COLUMN "bar" integer NOT NULL;
@@ -757,7 +757,7 @@ SELECT 1;
757
757
  }
758
758
 
759
759
  #[test]
760
- fn test_span_offsets() {
760
+ fn span_offsets() {
761
761
  let sql = r#"
762
762
 
763
763
  ALTER TABLE "core_recipe" ADD COLUMN "foo" integer NOT NULL;
@@ -773,7 +773,7 @@ SELECT 1;
773
773
  /// `pretty_violations` was slicing the SQL improperly, trimming off the first
774
774
  /// letter.
775
775
  #[test]
776
- fn test_trimming_sql_newlines() {
776
+ fn trimming_sql_newlines() {
777
777
  let sql = r#"ALTER TABLE "core_recipe" ADD COLUMN "foo" integer NOT NULL;"#;
778
778
  let violations = lint_sql(sql);
779
779
 
@@ -9,7 +9,9 @@ extern crate lazy_static;
9
9
 
10
10
  use crate::errors::CheckSqlError;
11
11
  use crate::rules::adding_required_field;
12
+ use crate::rules::ban_alter_domain_with_add_constraint;
12
13
  use crate::rules::ban_concurrent_index_creation_in_transaction;
14
+ use crate::rules::ban_create_domain_with_constraint;
13
15
  use crate::rules::ban_drop_not_null;
14
16
  use crate::rules::prefer_big_int;
15
17
  use crate::rules::prefer_identity;
@@ -98,6 +100,15 @@ lazy_static! {
98
100
 
99
101
  ],
100
102
  },
103
+ SquawkRule {
104
+ name: RuleViolationKind::BanAlterDomainWithAddConstraint,
105
+ func: ban_alter_domain_with_add_constraint,
106
+ messages: vec![
107
+ ViolationMessage::Note(
108
+ "Domains with constraints have poor support for online migrations".into()
109
+ ),
110
+ ],
111
+ },
101
112
  SquawkRule {
102
113
  name: RuleViolationKind::BanCharField,
103
114
  func: ban_char_type,
@@ -119,6 +130,15 @@ lazy_static! {
119
130
  ),
120
131
  ],
121
132
  },
133
+ SquawkRule {
134
+ name: RuleViolationKind::BanCreateDomainWithConstraint,
135
+ func: ban_create_domain_with_constraint,
136
+ messages: vec![
137
+ ViolationMessage::Note(
138
+ "Domains with constraints have poor support for online migrations".into()
139
+ ),
140
+ ],
141
+ },
122
142
  SquawkRule {
123
143
  name: RuleViolationKind::BanDropColumn,
124
144
  func: ban_drop_column,
@@ -425,7 +445,7 @@ mod test_rules {
425
445
  }
426
446
  /// Ensure we handle both serializing and deserializing `RuleViolationKind`
427
447
  #[test]
428
- fn test_parsing_rule_kind() {
448
+ fn parsing_rule_kind() {
429
449
  let rule_names = RULES.iter().map(|r| r.name.clone());
430
450
  for rule in rule_names {
431
451
  let rule_str = rule.to_string();
@@ -435,19 +455,19 @@ mod test_rules {
435
455
  }
436
456
  /// Ensure rule names don't change
437
457
  #[test]
438
- fn test_rule_names_debug_snap() {
458
+ fn rule_names_debug_snap() {
439
459
  let rule_names: Vec<String> = RULES.iter().map(|r| r.name.to_string()).collect();
440
460
  assert_debug_snapshot!(rule_names);
441
461
  }
442
462
  #[test]
443
- fn test_rule_names_display_snap() {
463
+ fn rule_names_display_snap() {
444
464
  let rule_names: Vec<String> = RULES.iter().map(|r| r.name.to_string()).collect();
445
465
  assert_display_snapshot!(rule_names.join("\n"));
446
466
  }
447
467
 
448
468
  /// Ensure we stort the resulting violations by where they occur in the file.
449
469
  #[test]
450
- fn test_check_rules_orderin() {
470
+ fn check_rules_orderin() {
451
471
  let sql = r#"
452
472
  ALTER TABLE "table_name" RENAME COLUMN "column_name" TO "new_column_name";
453
473
  CREATE INDEX "field_name_idx" ON "table_name" ("field_name");
@@ -45,7 +45,6 @@ pub fn adding_field_with_default(
45
45
  .filter(|x| !x.is_empty())
46
46
  .collect();
47
47
 
48
- // println!("{:#?}", non_volatile_funcs);
49
48
  for raw_stmt in tree {
50
49
  match &raw_stmt.stmt {
51
50
  Stmt::AlterTableStmt(stmt) => {
@@ -132,7 +131,7 @@ mod test_rules {
132
131
  /// -- remove nullability
133
132
  /// ```
134
133
  #[test]
135
- fn test_docs_example_bad() {
134
+ fn docs_example_bad() {
136
135
  let bad_sql = r#"
137
136
  -- instead of
138
137
  ALTER TABLE "core_recipe" ADD COLUMN "foo" integer DEFAULT 10;
@@ -140,7 +139,7 @@ ALTER TABLE "core_recipe" ADD COLUMN "foo" integer DEFAULT 10;
140
139
  assert_debug_snapshot!(lint_sql(bad_sql, None));
141
140
  }
142
141
  #[test]
143
- fn test_docs_example_ok() {
142
+ fn docs_example_ok() {
144
143
  let ok_sql = r#"
145
144
  -- use
146
145
  ALTER TABLE "core_recipe" ADD COLUMN "foo" integer;
@@ -152,7 +151,7 @@ ALTER TABLE "core_recipe" ALTER COLUMN "foo" SET DEFAULT 10;
152
151
  }
153
152
 
154
153
  #[test]
155
- fn test_default_integer_ok() {
154
+ fn default_integer_ok() {
156
155
  let ok_sql = r#"
157
156
  -- NON-VOLATILE
158
157
  ALTER TABLE "core_recipe" ADD COLUMN "foo" integer DEFAULT 10;
@@ -163,7 +162,7 @@ ALTER TABLE "core_recipe" ADD COLUMN "foo" integer DEFAULT 10;
163
162
  }
164
163
 
165
164
  #[test]
166
- fn test_default_uuid_err() {
165
+ fn default_uuid_err() {
167
166
  let bad_sql = r#"
168
167
  -- VOLATILE
169
168
  ALTER TABLE "core_recipe" ADD COLUMN "foo" integer DEFAULT uuid();
@@ -174,7 +173,7 @@ ALTER TABLE "core_recipe" ADD COLUMN "foo" integer DEFAULT uuid();
174
173
  }
175
174
 
176
175
  #[test]
177
- fn test_default_volatile_func_err() {
176
+ fn default_volatile_func_err() {
178
177
  let bad_sql = r#"
179
178
  -- VOLATILE
180
179
  ALTER TABLE "core_recipe" ADD COLUMN "foo" boolean DEFAULT random();
@@ -183,7 +182,7 @@ ALTER TABLE "core_recipe" ADD COLUMN "foo" boolean DEFAULT random();
183
182
  assert_debug_snapshot!(lint_sql(bad_sql, pg_version_11));
184
183
  }
185
184
  #[test]
186
- fn test_default_bool_ok() {
185
+ fn default_bool_ok() {
187
186
  let ok_sql = r#"
188
187
  -- NON-VOLATILE
189
188
  ALTER TABLE "core_recipe" ADD COLUMN "foo" boolean DEFAULT true;
@@ -192,7 +191,7 @@ ALTER TABLE "core_recipe" ADD COLUMN "foo" boolean DEFAULT true;
192
191
  assert_debug_snapshot!(lint_sql(ok_sql, pg_version_11));
193
192
  }
194
193
  #[test]
195
- fn test_default_str_ok() {
194
+ fn default_str_ok() {
196
195
  let ok_sql = r#"
197
196
  -- NON-VOLATILE
198
197
  ALTER TABLE "core_recipe" ADD COLUMN "foo" text DEFAULT 'some-str';
@@ -201,7 +200,7 @@ ALTER TABLE "core_recipe" ADD COLUMN "foo" text DEFAULT 'some-str';
201
200
  assert_debug_snapshot!(lint_sql(ok_sql, pg_version_11));
202
201
  }
203
202
  #[test]
204
- fn test_default_enum_ok() {
203
+ fn default_enum_ok() {
205
204
  let ok_sql = r#"
206
205
  -- NON-VOLATILE
207
206
  ALTER TABLE "core_recipe" ADD COLUMN "foo" some_enum_type DEFAULT 'my-enum-variant';
@@ -210,7 +209,7 @@ ALTER TABLE "core_recipe" ADD COLUMN "foo" some_enum_type DEFAULT 'my-enum-varia
210
209
  assert_debug_snapshot!(lint_sql(ok_sql, pg_version_11));
211
210
  }
212
211
  #[test]
213
- fn test_default_jsonb_ok() {
212
+ fn default_jsonb_ok() {
214
213
  let ok_sql = r#"
215
214
  -- NON-VOLATILE
216
215
  ALTER TABLE "core_recipe" ADD COLUMN "foo" jsonb DEFAULT '{}'::jsonb;
@@ -219,7 +218,7 @@ ALTER TABLE "core_recipe" ADD COLUMN "foo" jsonb DEFAULT '{}'::jsonb;
219
218
  assert_debug_snapshot!(lint_sql(ok_sql, pg_version_11));
220
219
  }
221
220
  #[test]
222
- fn test_default_arbitrary_func_err() {
221
+ fn default_arbitrary_func_err() {
223
222
  let ok_sql = r#"
224
223
  -- NON-VOLATILE
225
224
  ALTER TABLE "core_recipe" ADD COLUMN "foo" jsonb DEFAULT myjsonb();
@@ -228,7 +227,7 @@ ALTER TABLE "core_recipe" ADD COLUMN "foo" jsonb DEFAULT myjsonb();
228
227
  assert_debug_snapshot!(lint_sql(ok_sql, pg_version_11));
229
228
  }
230
229
  #[test]
231
- fn test_default_random_with_args_err() {
230
+ fn default_random_with_args_err() {
232
231
  let ok_sql = r#"
233
232
  -- NON-VOLATILE
234
233
  ALTER TABLE "core_recipe" ADD COLUMN "foo" timestamptz DEFAULT now(123);
@@ -237,7 +236,7 @@ ALTER TABLE "core_recipe" ADD COLUMN "foo" timestamptz DEFAULT now(123);
237
236
  assert_debug_snapshot!(lint_sql(ok_sql, pg_version_11));
238
237
  }
239
238
  #[test]
240
- fn test_default_now_func_ok() {
239
+ fn default_now_func_ok() {
241
240
  let ok_sql = r#"
242
241
  -- NON-VOLATILE
243
242
  ALTER TABLE "core_recipe" ADD COLUMN "foo" timestamptz DEFAULT now();
@@ -246,7 +245,7 @@ ALTER TABLE "core_recipe" ADD COLUMN "foo" timestamptz DEFAULT now();
246
245
  assert_debug_snapshot!(lint_sql(ok_sql, pg_version_11));
247
246
  }
248
247
  #[test]
249
- fn test_add_numbers_ok() {
248
+ fn add_numbers_ok() {
250
249
  // This should be okay, but we don't handle expressions like this at the moment.
251
250
  let ok_sql = r"
252
251
  alter table account_metadata add column blah integer default 2 + 2;
@@ -256,7 +255,7 @@ alter table account_metadata add column blah integer default 2 + 2;
256
255
  }
257
256
 
258
257
  #[test]
259
- fn test_generated_stored() {
258
+ fn generated_stored() {
260
259
  let bad_sql = r"
261
260
  ALTER TABLE foo
262
261
  ADD COLUMN bar numeric GENERATED ALWAYS AS (bar + baz) STORED;
@@ -85,7 +85,7 @@ mod test_rules {
85
85
  }
86
86
 
87
87
  #[test]
88
- fn test_create_table_with_foreign_key_constraint() {
88
+ fn create_table_with_foreign_key_constraint() {
89
89
  let sql = r#"
90
90
  BEGIN;
91
91
  CREATE TABLE email (
@@ -104,7 +104,7 @@ COMMIT;
104
104
  assert_eq!(violations.len(), 0);
105
105
  }
106
106
  #[test]
107
- fn test_add_foreign_key_constraint_not_valid_validate() {
107
+ fn add_foreign_key_constraint_not_valid_validate() {
108
108
  let sql = r#"
109
109
  BEGIN;
110
110
  ALTER TABLE "email" ADD COLUMN "user_id" INT;
@@ -117,7 +117,7 @@ COMMIT;
117
117
  assert_eq!(violations.len(), 0);
118
118
  }
119
119
  #[test]
120
- fn test_add_foreign_key_constraint_lock() {
120
+ fn add_foreign_key_constraint_lock() {
121
121
  let sql = r#"
122
122
  BEGIN;
123
123
  ALTER TABLE "email" ADD COLUMN "user_id" INT;
@@ -133,7 +133,7 @@ COMMIT;
133
133
  );
134
134
  }
135
135
  #[test]
136
- fn test_add_column_references_lock() {
136
+ fn add_column_references_lock() {
137
137
  let sql = r#"
138
138
  BEGIN;
139
139
  ALTER TABLE "emails" ADD COLUMN "user_id" INT REFERENCES "user" ("id");
@@ -7,16 +7,10 @@ use squawk_parser::ast::{AlterTableCmds, AlterTableType, RawStmt, Stmt};
7
7
  #[must_use]
8
8
  pub fn adding_not_nullable_field(
9
9
  tree: &[RawStmt],
10
- pg_version: Option<Version>,
10
+ _pg_version: Option<Version>,
11
11
  _assume_in_transaction: bool,
12
12
  ) -> Vec<RuleViolation> {
13
13
  let mut errs = vec![];
14
- if let Some(pg_version) = pg_version {
15
- let pg_11 = Version::new(11, Some(0), Some(0));
16
- if pg_version >= pg_11 {
17
- return errs;
18
- }
19
- }
20
14
 
21
15
  for raw_stmt in tree {
22
16
  match &raw_stmt.stmt {
@@ -42,36 +36,27 @@ pub fn adding_not_nullable_field(
42
36
 
43
37
  #[cfg(test)]
44
38
  mod test_rules {
45
- use std::str::FromStr;
46
-
47
39
  use crate::{
48
40
  check_sql_with_rule,
49
- versions::Version,
50
41
  violations::{RuleViolation, RuleViolationKind},
51
42
  };
52
43
 
53
- fn lint_sql(sql: &str, pg_version: Option<Version>) -> Vec<RuleViolation> {
54
- check_sql_with_rule(
55
- sql,
56
- &RuleViolationKind::AddingNotNullableField,
57
- pg_version,
58
- false,
59
- )
60
- .unwrap()
44
+ fn lint_sql(sql: &str) -> Vec<RuleViolation> {
45
+ check_sql_with_rule(sql, &RuleViolationKind::AddingNotNullableField, None, false).unwrap()
61
46
  }
62
47
 
63
48
  use insta::assert_debug_snapshot;
64
49
 
65
50
  #[test]
66
- fn test_set_not_null() {
67
- let sql = r#"
51
+ fn set_not_null() {
52
+ let bad_sql = r#"
68
53
  ALTER TABLE "core_recipe" ALTER COLUMN "foo" SET NOT NULL;
69
54
  "#;
70
- assert_debug_snapshot!(lint_sql(sql, None));
55
+ assert_debug_snapshot!(lint_sql(bad_sql));
71
56
  }
72
57
 
73
58
  #[test]
74
- fn test_adding_field_that_is_not_nullable() {
59
+ fn adding_field_that_is_not_nullable() {
75
60
  let ok_sql = r#"
76
61
  BEGIN;
77
62
  -- This will cause a table rewrite for Postgres versions before 11, but that is handled by
@@ -80,28 +65,15 @@ ALTER TABLE "core_recipe" ADD COLUMN "foo" integer DEFAULT 10 NOT NULL;
80
65
  ALTER TABLE "core_recipe" ALTER COLUMN "foo" DROP DEFAULT;
81
66
  COMMIT;
82
67
  "#;
83
- assert_debug_snapshot!(lint_sql(ok_sql, None));
68
+ assert_debug_snapshot!(lint_sql(ok_sql));
84
69
  }
85
70
 
86
71
  #[test]
87
- fn test_adding_field_that_is_not_nullable_without_default() {
72
+ fn adding_field_that_is_not_nullable_without_default() {
88
73
  let ok_sql = r#"
89
74
  -- This won't work if the table is populated, but that error is caught by adding-required-field.
90
75
  ALTER TABLE "core_recipe" ADD COLUMN "foo" integer NOT NULL;
91
76
  "#;
92
- assert_debug_snapshot!(lint_sql(ok_sql, None));
93
- }
94
-
95
- #[test]
96
- fn test_adding_field_that_is_not_nullable_in_version_11() {
97
- let ok_sql = r#"
98
- BEGIN;
99
- --
100
- -- Add field foo to recipe
101
- --
102
- ALTER TABLE "core_recipe" ADD COLUMN "foo" integer NOT NULL DEFAULT 10;
103
- COMMIT;
104
- "#;
105
- assert_debug_snapshot!(lint_sql(ok_sql, Some(Version::from_str("11.0.0").unwrap()),));
77
+ assert_debug_snapshot!(lint_sql(ok_sql));
106
78
  }
107
79
  }
@@ -75,7 +75,7 @@ mod test_rules {
75
75
  }
76
76
 
77
77
  #[test]
78
- fn test_serial_primary_key() {
78
+ fn serial_primary_key() {
79
79
  let bad_sql = r"
80
80
  ALTER TABLE a ADD COLUMN b SERIAL PRIMARY KEY;
81
81
  ";
@@ -86,7 +86,7 @@ ALTER TABLE a ADD COLUMN b SERIAL PRIMARY KEY;
86
86
  }
87
87
 
88
88
  #[test]
89
- fn test_plain_primary_key() {
89
+ fn plain_primary_key() {
90
90
  let bad_sql = r"
91
91
  ALTER TABLE items ADD PRIMARY KEY (id);
92
92
  ";
@@ -75,7 +75,7 @@ mod test_rules {
75
75
  }
76
76
 
77
77
  #[test]
78
- fn test_nullable() {
78
+ fn nullable() {
79
79
  let ok_sql = r#"
80
80
  ALTER TABLE "recipe" ADD COLUMN "public" boolean;
81
81
  "#;
@@ -83,7 +83,7 @@ ALTER TABLE "recipe" ADD COLUMN "public" boolean;
83
83
  }
84
84
 
85
85
  #[test]
86
- fn test_not_null_with_default() {
86
+ fn not_null_with_default() {
87
87
  let ok_sql = r#"
88
88
  ALTER TABLE "recipe" ADD COLUMN "public" boolean NOT NULL DEFAULT true;
89
89
  "#;
@@ -91,14 +91,14 @@ ALTER TABLE "recipe" ADD COLUMN "public" boolean NOT NULL DEFAULT true;
91
91
  }
92
92
 
93
93
  #[test]
94
- fn test_not_null_without_default() {
94
+ fn not_null_without_default() {
95
95
  let bad_sql = r#"
96
96
  ALTER TABLE "recipe" ADD COLUMN "public" boolean NOT NULL;
97
97
  "#;
98
98
  assert_debug_snapshot!(lint_sql(bad_sql));
99
99
  }
100
100
  #[test]
101
- fn test_generated_stored_not_null() {
101
+ fn generated_stored_not_null() {
102
102
  let ok_sql = r"
103
103
  ALTER TABLE foo
104
104
  ADD COLUMN bar numeric GENERATED ALWAYS AS (bar + baz) STORED NOT NULL;
@@ -106,7 +106,7 @@ ALTER TABLE "recipe" ADD COLUMN "public" boolean NOT NULL;
106
106
  assert_debug_snapshot!(lint_sql(ok_sql));
107
107
  }
108
108
  #[test]
109
- fn test_generated_stored() {
109
+ fn generated_stored() {
110
110
  let ok_sql = r"
111
111
  ALTER TABLE foo
112
112
  ADD COLUMN bar numeric GENERATED ALWAYS AS (bar + baz) STORED ;
@@ -0,0 +1,71 @@
1
+ use crate::{
2
+ versions::Version,
3
+ violations::{RuleViolation, RuleViolationKind},
4
+ };
5
+
6
+ use squawk_parser::ast::{RawStmt, Stmt};
7
+
8
+ #[must_use]
9
+ pub fn ban_alter_domain_with_add_constraint(
10
+ tree: &[RawStmt],
11
+ _pg_version: Option<Version>,
12
+ _assume_in_transaction: bool,
13
+ ) -> Vec<RuleViolation> {
14
+ let mut errs = vec![];
15
+ for raw_stmt in tree {
16
+ match &raw_stmt.stmt {
17
+ Stmt::AlterDomainStmt(stmt) if stmt.subtype == "C" => {
18
+ errs.push(RuleViolation::new(
19
+ RuleViolationKind::BanAlterDomainWithAddConstraint,
20
+ raw_stmt.into(),
21
+ None,
22
+ ));
23
+ }
24
+ _ => continue,
25
+ }
26
+ }
27
+ errs
28
+ }
29
+
30
+ #[cfg(test)]
31
+ mod test_rules {
32
+ use crate::{
33
+ check_sql_with_rule,
34
+ violations::{RuleViolation, RuleViolationKind},
35
+ };
36
+
37
+ use insta::assert_debug_snapshot;
38
+
39
+ fn lint_sql(sql: &str) -> Vec<RuleViolation> {
40
+ check_sql_with_rule(
41
+ sql,
42
+ &RuleViolationKind::BanAlterDomainWithAddConstraint,
43
+ None,
44
+ false,
45
+ )
46
+ .unwrap()
47
+ }
48
+
49
+ #[test]
50
+ fn ban_alter_domain_without_add_constraint_is_ok() {
51
+ let sql = r"
52
+ ALTER DOMAIN domain_name_1 SET DEFAULT 1;
53
+ ALTER DOMAIN domain_name_2 SET NOT NULL;
54
+ ALTER DOMAIN domain_name_3 DROP CONSTRAINT other_domain_name;
55
+ ALTER DOMAIN domain_name_4 RENAME CONSTRAINT constraint_name TO other_constraint_name;
56
+ ALTER DOMAIN domain_name_5 RENAME TO other_domain_name;
57
+ ALTER DOMAIN domain_name_6 VALIDATE CONSTRAINT constraint_name;
58
+ ALTER DOMAIN domain_name_7 OWNER TO you;
59
+ ALTER DOMAIN domain_name_8 SET SCHEMA foo;
60
+ ";
61
+ assert_eq!(lint_sql(sql), vec![]);
62
+ }
63
+
64
+ #[test]
65
+ fn ban_alter_domain_with_add_constraint_works() {
66
+ let sql = r"
67
+ ALTER DOMAIN domain_name ADD CONSTRAINT constraint_name CHECK (value > 0);
68
+ ";
69
+ assert_debug_snapshot!(lint_sql(sql));
70
+ }
71
+ }