Eugene 🔒 lint report of examples/W12/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,
email text
)
No checks matched for this statement. ✅
Eugene 🔒 lint report of examples/W12/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
set lock_timeout = '2s'
No checks matched for this statement. ✅
Statement number 2
SQL
alter table authors
alter column name set not null
No checks matched for this statement. ✅
Statement number 3
SQL
-- eugene: ignore E2, E4
alter table authors
alter column email set not null
Lints
Multiple ALTER TABLE
statements where one will do
ID: W12
Multiple ALTER TABLE
statements targets the same table. If the statements require table scans, there will be more scans than necessary. A safer way is: Combine the statements into one, separating the action with commas.
Multiple ALTER TABLE
statements on public.authors
. Combine them into a single statement to avoid scanning the table multiple times..