Describe the bug
SafeQL executes the queries each time the ESLint is restarted which causes an unexpected dropping of the database table and leads to the error Internal error: relation "animals" does not exist
immediately after restarting the ESLint.
To Reproduce
Steps to reproduce the behavior:
It executes the queries below.
e.g
exports.up = async (sql) => {
await sql`
CREATE TABLE animals (
id integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
)
`;
};
exports.down = async (sql) => {
await sql`
DROP TABLE animals
`;
};
restart ESLint: cmd + shift + P => ESLint: Restart ESLint Server
Expected behavior
Should not execute any SQL queries
Screenshots
If applicable, add screenshots to help explain your problem.
Before restarting the ESLint
Desktop (please complete the following information):
Additional context
As far as i can tell, SafeQL tries to avoid executing the query by using `sql``.describe()
.describe()
should not execute the query according to Postgres.js
But it seems SafeQL is actually executing the query for DROP TABLE
which is a big problem
Owner Name | ts-safeql |
Repo Name | safeql |
Full Name | ts-safeql/safeql |
Language | TypeScript |
Created Date | 2022-09-08 |
Updated Date | 2023-03-16 |
Star Count | 795 |
Watcher Count | 5 |
Fork Count | 14 |
Issue Count | 7 |
Issue Title | Created Date | Updated Date |
---|