Skip to content

Warnings when a DROP statement is in SQL #1

Description

@erichosick

When using sql-watch, a developer may sometime add a DROP statement such as:

DROP TABLE myschema.work_in_progress_table CASCADE;

To help minimize the risk of this type of code being checked-in, we would like to warn developers of such code with a warning (presented when running sql-watch:

WARN: File './run/020_myschema-schema.sql' contains 'DROP TABLE myschema.work_in_progress_table CASCADE;'

In some cases, a drop table would need to be checked in. In these cases the prior line would have the following comment
-- sql-watch-ignore drop-ddl OR /* sql-watch-ignore drop-ddl */.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions