"CREATE TABLE IF NOT EXISTS" results in a false-positive error if table already exists
- Lenguaje dominante
- TypeScript
- Estrellas
- 25
- Forks
- 22
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
El informe no indica ningún archivo de origen ni punto de entrada de prueba. Reproduce el script de migración de Entity Framework con una tabla __EFMigrationsHistory existente, luego rastrea cómo la acción de PostgreSQL gestiona la NOTICE y verifica que esta notice esperada ya no haga fallar la compilación.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- postgresql, typescript
- Área
- database, devops
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100