Flyway

Code Analysis Rules

Code Analysis Rules

Flyway can call SQLFluff and include code violations in the check report.

You can find more detail of these rules in the SQLFluff rules description.

Enterprise Rules

Flyway Enterprise

Redgate has added a set of additional rules that are of interest to customers with a larger and more complex database infrastructure.

Enterprise customers are also able to define their own rules - see Creating Regular Expression Rules

Flyway_L001 ( [DEPRECATED], replaced by RX013)

CREATE TABLE statement without a PRIMARY KEY constraint

Dialects: All

It is best practice in most situations to define a primary key for each table. This can facilitate querying and ordering data

Flyway_L002 ( [DEPRECATED], replaced by RX014)

A table has been created but has no MS_Description property added

Dialects: TSQL

Intrinsic documentation helps other database developers and can be used to generate documentation about the database.

RX001

DROP TABLE statement

Dialects: All

Dropping a table is likely to result in the loss of data so should be investigated before continuing.

RX002

Attempt to change password

Dialects: Oracle/PostgreSQL/TSQL

Changing passwords through a DB migration is not considered best practice

RX003

TRUNCATE statement used

Dialects: All

This operation is likely to result in a loss of data so should be investigated before continuing

RX004

DROP COLUMN statement used

Dialects: All

This operation is likely to result in a loss of data so should be investigated before continuing

RX005

GRANT TO PUBLIC statement used

Dialects: All

It is not common to access to this degree so should be investigated before continuing

RX006

GRANT WITH GRANT OPTION statement used

Dialects: All

Allows grantee to grant additional permissions and so it becomes difficult to track the scope of permissions

RX007

GRANT WITH ADMIN OPTION statement used

Dialects: All

Allows grantee to grant administrative permissions and so it becomes difficult to control the scope of permissions

RX008

ALTER USER statement used

Dialects: All

Modifies the properties of an existing user and should be investigated before continuing

RX009

GRANT ALL statement used

Dialects: All

It is not common to access to this degree so should be investigated before continuing

RX010

CREATE ROLE statement used

Dialects: All

RX011

ALTER ROLE statement used

This is used to modify user accounts so should be investigated before continuing

Dialects: All

RX012

DROP PARTITION statement used

Dialects: All

RX013

CREATE TABLE statement without a PRIMARY KEY constraint

Dialects: All

RX014

A table has been created but has no MS_Description property added

Dialects: TSQL

This operation is likely to result in a loss of data so should be investigated before continuing


Didn't find what you were looking for?