Title: [Bug]: Incorrect foreign key mismatch error · Issue #4155 · sqlitebrowser/sqlitebrowser · GitHub
Open Graph Title: [Bug]: Incorrect foreign key mismatch error · Issue #4155 · sqlitebrowser/sqlitebrowser
X Title: [Bug]: Incorrect foreign key mismatch error · Issue #4155 · sqlitebrowser/sqlitebrowser
Description: 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_boar...
Open Graph Description: 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 ...
X Description: 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 ...
Opengraph URL: https://github.com/sqlitebrowser/sqlitebrowser/issues/4155
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Incorrect foreign key mismatch error","articleBody":"### What did you do?\n\nWith the tables:\n\n```\nCREATE TABLE IF NOT EXISTS single_drives(\n drive_sequential_number INTEGER PRIMARY KEY,\n drive_serial_number TEXT NOT NULL, \n drive_model TEXT, \n base_board INTEGER NOT NULL, \n cpu_board INTEGER, \n transistor_board INTEGER, \n filter_board INTEGER, \n fpga_firmware TEXT,\n dsp_firmware TEXT, \n boot_version TEXT, \n notes TEXT, \n service_notes TEXT, \n previous_sequential_number INTEGER,\n UNIQUE(drive_sequential_number),\n UNIQUE(drive_serial_number),\n FOREIGN KEY(base_board) REFERENCES drive_base_boards(base_board_id)\n ON UPDATE CASCADE\n ON DELETE SET NULL,\n FOREIGN KEY(cpu_board) REFERENCES drive_cpu_boards(cpu_board_id)\n ON UPDATE CASCADE\n ON DELETE SET NULL,\n FOREIGN KEY(transistor_board) REFERENCES drive_transistor_boards(transistor_board_id)\n ON UPDATE CASCADE\n ON DELETE SET NULL,\n FOREIGN KEY(filter_board) REFERENCES drive_cpu_boards(filter_board_id)\n ON UPDATE CASCADE\n ON DELETE SET NULL\n FOREIGN KEY(previous_sequential_number) REFERENCES single_drives(drive_sequential_number)\n ON UPDATE CASCADE\n ON DELETE SET NULL\n\nCREATE TABLE IF NOT EXISTS drive_cpu_boards(\n cpu_board_id INTEGER PRIMARY KEY,\n cpu_board_serial_number TEXT NOT NULL,\n UNIQUE(cpu_board_id)\n UNIQUE(cpu_board_serial_number)\n )\n```\n(other tables are present in the database, but I don't believe they are relevant to this error)\nI attempted to delete a row from the \"single_drives\" table by highlighting it in the Browse Data tab and pressing delete.\n\n### What did you expect to see?\n\nI expected the row to be deleted.\n\n### What did you see instead?\n\n\u003cimg width=\"499\" height=\"129\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/21433b89-d4a9-4ce2-944a-75c146e33aa1\" />\nI 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.\n\nI 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\n\n### DB4S Version\n\n3.13.1\n\n### What OS are you seeing the problem on?\n\nWindows\n\n### OS version\n\nWindows 11\n\n### Relevant log output\n\n```shell\n\n```\n\n### Prevention against duplicate issues\n\n- [x] I have searched for similar issues","author":{"url":"https://github.com/VamcoDThomson","@type":"Person","name":"VamcoDThomson"},"datePublished":"2026-06-24T19:13:54Z","url":"https://github.com/sqlitebrowser/sqlitebrowser/issues/4155"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8af18779-b838-925c-8b02-fcded48a093d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CDBE:250B41:1B0A5:24584:6AFD286B |
| html-safe-nonce | 3a2383dc39a8727f3f6d37a534260eb9a655539e25f5ffa1ad6523f457b3bd28 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDREJFOjI1MEI0MToxQjBBNToyNDU4NDo2QUZEMjg2QiIsInZpc2l0b3JfaWQiOiI0MzQ5ODE1NTY3NzYzMTg3ODE5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d4290b052048a0f4955e1750158b9ae7fefad25cc9119144f853ab0256af0ed8 |
| hovercard-subject-tag | issue:4737689725 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sqlitebrowser/sqlitebrowser/4155/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1c270fdcbd26d788278a67c27f9f36142482859602a24004b33a54ec5ded51ad/sqlitebrowser/sqlitebrowser/issues/4155 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1c270fdcbd26d788278a67c27f9f36142482859602a24004b33a54ec5ded51ad/sqlitebrowser/sqlitebrowser/issues/4155 |
| og:image:alt | 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 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | VamcoDThomson |
| hostname | github.com |
| expected-hostname | github.com |
| None | 065128366c233a9d57ff68ab6c96e25b99dd1b0ab70d23b70873d3dd6b5e4f19 |
| turbo-cache-control | no-preview |
| go-import | github.com/sqlitebrowser/sqlitebrowser git https://github.com/sqlitebrowser/sqlitebrowser.git |
| octolytics-dimension-user_id | 7454271 |
| octolytics-dimension-user_login | sqlitebrowser |
| octolytics-dimension-repository_id | 19416551 |
| octolytics-dimension-repository_nwo | sqlitebrowser/sqlitebrowser |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 19416551 |
| octolytics-dimension-repository_network_root_nwo | sqlitebrowser/sqlitebrowser |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 941021edf0c2ec58298f4a2c8f27ae507d129c92 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width