Eugene 🔒 lint report of examples/W13/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 did not pass all the checks ❌
Statement number 1
SQL
-- 1.sql
create type document_type
as enum ('invoice', 'receipt', 'other')
Lints
Creating an enum
ID: W13
A new enum was created. Removing values from an enum requires difficult migrations, and associating more data with an enum value is difficult. A safer way is: Use a foreign key to a lookup table instead.
Created enum document_type
. Enumerated types are not recommended for use in new applications. Consider using a foreign key to a lookup table instead..
Statement number 2
SQL
create table document (
id int generated always as identity
primary key,
type document_type
)
No checks matched for this statement. ✅