Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Bug]: Incorrect foreign key mismatch error

Abierto
#4,155 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
cpp, sqlite
Área
database, desktop

Línea de trabajo

Comienza reproduciendo la eliminación desde la pestaña Browse Data con el esquema proporcionado de single_drives y drive_cpu_boards, y luego compárala con la eliminación fuera del navegador. Traza la ruta de eliminación de filas del navegador y verifica que eliminar una fila ya no informe de una discrepancia de clave foránea en este caso.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

What did you do?

With the tables:

CREATE TABLE IF NOT EXISTS single_drives(
        drive_sequential_number     INTEGER PRIMARY KEY,
        drive_serial_number         TEXT NOT NULL, 
        drive_model                 TEXT, 
        base_board                  INTEGER NOT NULL, 
        cpu_board                   INTEGER, 
        transistor_board            INTEGER, 
        filter_board                INTEGER, 
        fpga_firmware               TEXT,
        dsp_firmware                TEXT, 
        boot_version                TEXT, 
        notes                       TEXT, 
        service_notes               TEXT, 
        previous_sequential_number  INTEGER,
        UNIQUE(drive_sequential_number),
        UNIQUE(drive_serial_number),
        FOREIGN KEY(base_board)                 REFERENCES drive_base_boards(base_board_id)
            ON UPDATE CASCADE
            ON DELETE SET NULL,
        FOREIGN KEY(cpu_board)                  REFERENCES drive_cpu_boards(cpu_board_id)
            ON UPDATE CASCADE
            ON DELETE SET NULL,
        FOREIGN KEY(transistor_board)           REFERENCES drive_transistor_boards(transistor_board_id)
            ON UPDATE CASCADE
            ON DELETE SET NULL,
        FOREIGN KEY(filter_board)               REFERENCES drive_cpu_boards(filter_board_id)
            ON UPDATE CASCADE
            ON DELETE SET NULL
        FOREIGN KEY(previous_sequential_number) REFERENCES single_drives(drive_sequential_number)
            ON UPDATE CASCADE
            ON DELETE SET NULL

CREATE TABLE IF NOT EXISTS drive_cpu_boards(
        cpu_board_id               INTEGER PRIMARY KEY,
        cpu_board_serial_number    TEXT NOT NULL,
        UNIQUE(cpu_board_id)
        UNIQUE(cpu_board_serial_number)
        )

(other tables are present in the database, but I don't believe they are relevant to this error)
I attempted to delete a row from the "single_drives" table by highlighting it in the Browse Data tab and pressing delete.

What did you expect to see?

I expected the row to be deleted.

What did you see instead?
Image I received this error message. This occurs no matter the row I try to delete, and errors based on this same foreign key mismatch occur in other parts of the database as well.

I am able to delete rows from this and other tables when not using the browser, so this seems to be an issue with the browser and not the DB schema itself

DB4S Version

3.13.1

What OS are you seeing the problem on?

Windows

OS version

Windows 11

Relevant log output

Prevention against duplicate issues
  • I have searched for similar issues
Lenguaje dominante
C++
Estrellas
24.6k
Forks
2.4k
Merge medio
2 d 8 h
PR fusionados (30 d)
4

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de sqlitebrowser/sqlitebrowser

Todos los issues de sqlitebrowser/sqlitebrowser

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.