Eugene 🔒 lint report of examples/E9/bad/1.sql

This is a human readable SQL script safety report generated by eugene. Keep in mind that lints can be ignored by adding a -- eugene: ignore E123 comment to the SQL statement or by passing --ignore E123 on the command line.

The migration script passed all the checks ✅

Statement number 1

SQL

-- 1.sql
create table authors (
    id integer generated always as identity
        primary key,
    name text not null
)

No checks matched for this statement. ✅

Eugene 🔒 lint report of examples/E9/bad/2.sql

This is a human readable SQL script safety report generated by eugene. Keep in mind that lints can be ignored by adding a -- eugene: ignore E123 comment to the SQL statement or by passing --ignore E123 on the command line.

The migration script did not pass all the checks ❌

Statement number 1

SQL

-- 2.sql
alter table authors add column email text

Lints

Taking dangerous lock without timeout

ID: E9

A lock that would block many common operations was taken without a timeout. This can block all other operations on the table indefinitely if any other transaction holds a conflicting lock while idle in transaction or active. A safer way is: Run SET LOCAL lock_timeout = '2s'; before the statement and retry the migration if necessary.

Statement takes lock on public.authors, but does not set a lock timeout.