@@ -9,9 +9,10 @@ extern crate lazy_static;
99use crate :: errors:: CheckSQLError ;
1010use crate :: rules:: {
1111 adding_field_with_default, adding_foreign_key_constraint, adding_not_nullable_field,
12- adding_primary_key_constraint, ban_char_type, ban_drop_database, changing_column_type,
13- constraint_missing_not_valid, disallow_unique_constraint, prefer_robust_stmts,
14- prefer_text_field, renaming_column, renaming_table, require_concurrent_index_creation,
12+ adding_primary_key_constraint, ban_char_type, ban_drop_column, ban_drop_database,
13+ changing_column_type, constraint_missing_not_valid, disallow_unique_constraint,
14+ prefer_robust_stmts, prefer_text_field, renaming_column, renaming_table,
15+ require_concurrent_index_creation,
1516} ;
1617use crate :: violations:: { RuleViolation , RuleViolationKind , ViolationMessage } ;
1718use squawk_parser:: ast:: RootStmt ;
@@ -92,6 +93,16 @@ lazy_static! {
9293 ) ,
9394 ]
9495 } ,
96+ SquawkRule {
97+ id: "ban-drop-column" . into( ) ,
98+ name: RuleViolationKind :: BanDropColumn ,
99+ func: ban_drop_column,
100+ messages: vec![
101+ ViolationMessage :: Note (
102+ "Dropping a column may break existing clients." . into( )
103+ ) ,
104+ ] ,
105+ } ,
95106 SquawkRule {
96107 id: "ban-drop-database" . into( ) ,
97108 name: RuleViolationKind :: BanDropDatabase ,
@@ -234,7 +245,7 @@ lazy_static! {
234245 "Create the index CONCURRENTLY." . into( )
235246 ) ,
236247 ] ,
237- } ,
248+ }
238249 ] ;
239250
240251}
0 commit comments