mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-27 12:24:11 +02:00
Improved schema example for sqlite-utils extract
This commit is contained in:
parent
213a0ff177
commit
e328db8eba
1 changed files with 4 additions and 3 deletions
|
|
@ -1288,12 +1288,13 @@ This would produce the following schema:
|
||||||
[TreeAddress] TEXT,
|
[TreeAddress] TEXT,
|
||||||
[species_id] INTEGER,
|
[species_id] INTEGER,
|
||||||
FOREIGN KEY(species_id) REFERENCES species(id)
|
FOREIGN KEY(species_id) REFERENCES species(id)
|
||||||
)
|
);
|
||||||
|
|
||||||
CREATE TABLE [species] (
|
CREATE TABLE [species] (
|
||||||
[id] INTEGER PRIMARY KEY,
|
[id] INTEGER PRIMARY KEY,
|
||||||
[species] TEXT
|
[species] TEXT
|
||||||
)
|
);
|
||||||
|
CREATE UNIQUE INDEX [idx_species_species]
|
||||||
|
ON [species] ([species]);
|
||||||
|
|
||||||
The command takes the following options:
|
The command takes the following options:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue