Comments (3)
This has sort of been raised before. If table A has foreign keys to table B, then when the SQL is run it fails as table B doesn't exist yet, so your ordering request makes sense. However, for some users, understanding and processing this could be quite a task. Programmatically it could be even worse.
from sqlitebrowser.
If the issue has been raised before it should have been addressed. Look at this diff and quickly tell me what has changed. Then justify the rest of the changes:
diff --git a/sql/create-db.sql b/sql/create-db.sql
--- a/sql/create-db.sql
+++ b/sql/create-db.sql
@@ -27,9 +27,9 @@ DROP TABLE IF EXISTS "user_i";
CREATE TABLE IF NOT EXISTS "user_i" (
"user_id" INTEGER,
"i_id" INTEGER,
- FOREIGN KEY("i_id") REFERENCES "i"("id") on delete cascade,
+ PRIMARY KEY("user_id","i_id"),
FOREIGN KEY("user_id") REFERENCES "user"("id") on delete cascade,
- PRIMARY KEY("user_id","i_id")
+ FOREIGN KEY("i_id") REFERENCES "i"("id") on delete cascade
);
DROP TABLE IF EXISTS "connection";
CREATE TABLE IF NOT EXISTS "connection" (
@@ -40,17 +40,17 @@ CREATE TABLE IF NOT EXISTS "connection" (
"a" INTEGER NOT NULL DEFAULT 0,
"n" TEXT,
"s" TEXT,
- FOREIGN KEY("b_user_id") REFERENCES "user"("id") on delete cascade,
+ PRIMARY KEY("a_user_id","b_user_id"),
FOREIGN KEY("a_user_id") REFERENCES "user"("id") on delete cascade,
- PRIMARY KEY("a_user_id","b_user_id")
+ FOREIGN KEY("b_user_id") REFERENCES "user"("id") on delete cascade
);
DROP TABLE IF EXISTS "i"; CREATE TABLE IF NOT EXISTS "i" (
"id" INTEGER,
"c" INTEGER,
"n" TEXT NOT NULL UNIQUE,
- FOREIGN KEY("c") REFERENCES "i"("id"),
- PRIMARY KEY("id")
+ PRIMARY KEY("id"),
+ FOREIGN KEY("c") REFERENCES "i"("id")
);
DROP TABLE IF EXISTS "m";
CREATE TABLE IF NOT EXISTS "m" (
@@ -59,10 +59,10 @@ CREATE TABLE IF NOT EXISTS "m" (
"a_user_id" INTEGER NOT NULL,
"b_user_id" INTEGER NOT NULL,
"r" INTEGER DEFAULT 0,
- "m" TEXT NOT NULL,
- FOREIGN KEY("b_user_id") REFERENCES "user"("id") ON DELETE CASCADE,
+ "t" TEXT NOT NULL,
+ PRIMARY KEY("id" AUTOINCREMENT),
FOREIGN KEY("a_user_id") REFERENCES "user"("id") ON DELETE CASCADE,
- PRIMARY KEY("id" AUTOINCREMENT)
+ FOREIGN KEY("b_user_id") REFERENCES "user"("id") ON DELETE CASCADE
);
DROP INDEX IF EXISTS "idx.connection_from";
CREATE INDEX IF NOT EXISTS "idx.connection_from" ON "connection" (
from sqlitebrowser.
If the issue has been raised before it should have been addressed.
Addressing an issue requires code.
There is no code that has been posted in a PR that addresses this issue.
Without code to address the issue, how do you propose the issue should be addressed?
I have tried to wave my magic wand, but unfortunately it appears it's out of fairy dust.
Further comments on how I can obtain more fairy dust would be welcomed.
Sorry. Proper answer...
it should have been addressed
We await a PR to address the issue. This is an open-source project, so anyone can contribute.
Once a PR has been raised (and checked) it can be used.
Obviously until then, the issue cannot be 'addressed'.
Unfortunately, we don't have a team of 900 developers just standing by waiting for issues.
from sqlitebrowser.
Related Issues (20)
- [Bug]: Some UI text don't scale according to font size settings. HOT 3
- [Bug]: Exact filter on COUNT() column doesn't work HOT 10
- [Bug]: Assertion [cpMax <= pdoc->Length()] failed at ../scintilla/src/Editor.cpp 6096 HOT 3
- [Bug]: creation of new db file upon attach of non-existing file fails. HOT 2
- [Feature]: "Filter in any column" should only filter in '__rowid__' is visible HOT 3
- Add Debug Information to 'Continuous' Release HOT 2
- Check Update for Unstable Build HOT 1
- Port to Qt 6 HOT 1
- Rewrite Build Entries in the Wiki HOT 1
- Support for Branch-Specific Build Variants HOT 1
- [Bug]: Importing CSV with column headers doesn't work if columns are not in same order as table in DB HOT 1
- Quick Browse HOT 1
- [Feature]: Comment Line Shortcut key for "Execute SQL" tab and Shortcut Key selection screen HOT 3
- [Feature]: auto reopen last database HOT 8
- No data returned from SQL query HOT 2
- [Bug]: Can't run nightly build on macOS 12.7.4 HOT 7
- [Bug]: External drives cannot be opened on Ubuntu HOT 3
- [Bug]: Execute SQL Console overlaps text HOT 2
- [Feature]: Allow NOT operator '!' in front of filters
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqlitebrowser.