Open JamesAlexanderHill opened 11 months ago
CREATE TABLE IF NOT EXISTS T_A (
id TEXT PRIMARY KEY,
otherValue TEXT NOT NULL UNIQUE,
altValue BOOLEAN
);
CREATE TABLE IF NOT EXISTS T_B (
id TEXT PRIMARY KEY,
aId TEXT NOT NULL,
stuff BOOLEAN NOT NULL DEFAULT false,
CONSTRAINT fk_aId FOREIGN KEY (aId) REFERENCES T_A (id)
);
$ sqlite3 test.db < create_tables.sql
I use SQL file to create the database and then upload it to SQL viewer website, and I get the same result.
And in SQLite cli, I can see aId
is a foreign key.
What version of Bun is running?
1.0.7+b0393fba6200d8573f3433fb0af258a0e33ac157
What platform is your computer?
Darwin 21.6.0 x86_64 i386
What steps can reproduce the bug?
run the following in a script and view the file generated in SQL Viewer.
What is the expected behavior?
Expected behaviour:
T_B
will have columnid
marked as a primary key.T_B
will have columnaId
marked as a foreign key.What do you see instead?
T_B
will have columnid
marked as a primary and foreign key.Additional information
No response