"CREATE TABLE IF NOT EXISTS" results in a false-positive error if table already exists
- Lingua principale
- TypeScript
- Stelle
- 25
- Fork
- 22
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Take a script like the auto-generated migration history table creation by Entity Framework:
```sql
CREATE TABLE IF NOT EXISTS "__EFMigrationsHistory" (
"MigrationId" character varying(150) NOT NULL,
"ProductVersion" character varying(32) NOT NULL,
CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY ("MigrationId")
);
```
This results in a false error if the table actually already exists:
```
psql:/home/runner/work/somethingsomething.sql:5: NOTICE: relation "__EFMigrationsHistory" already exists, skipping
[...]
Error: Error occurred while running action:
Error: error in file: /home/runner/work/somethingsomething.sql
psql:/home/runner/work/somethingsomething.sql:5: NOTICE: relation "__EFMigrationsHistory" already exists, skipping
```
Which subsequently and wrongly fails the build.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
The report names no source file or test entry point. Reproduce the Entity Framework migration script with an existing __EFMigrationsHistory table, then trace how the PostgreSQL action handles the NOTICE and verify that this expected notice no longer causes the build to fail.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- postgresql, typescript
- Ambito
- database, devops
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100