Eugene 🔒 lint report of examples/W14/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(
name text
)
No checks matched for this statement. ✅
Eugene 🔒 lint report of examples/W14/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 passed all the checks ✅
Statement number 1
SQL
-- 2.sql
create unique index concurrently
authors_name_key on authors(name)
No checks matched for this statement. ✅
Eugene 🔒 lint report of examples/W14/bad/3.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
-- 3.sql
set local lock_timeout = '2s'
No checks matched for this statement. ✅
Statement number 2
SQL
alter table authors
add constraint authors_name_pkey
primary key using index authors_name_key
Lints
Adding a primary key using an index
ID: W14
A primary key was added using an index on the table. This can cause postgres to alter the index columns to be NOT NULL
. A safer way is: Make sure that all the columns in the index are already NOT NULL
.
New primary key constraint using index on public.authors
, may cause postgres to SET NOT NULL
on columns in the index. This lint may be a false positive if the columns are already NOT NULL
, ignore it by commenting the statement with -- eugene: ignore: W14
.