|
1 | 1 | -- All the tables used for testing |
2 | 2 |
|
3 | | --- This table stores information about plugin types |
4 | | -CREATE TABLE IF NOT EXISTS plugin_types ( |
5 | | - name TEXT UNIQUE -- Just the name of the plugin (unique) |
| 3 | +CREATE TABLE IF NOT EXISTS names ( |
| 4 | + name TEXT UNIQUE -- Just the name of the plugin (unique) |
6 | 5 | ); |
7 | | - |
8 | | --- CREATE INDEX IF NOT EXISTS idx_plugin_types_name ON plugin_types(Name); |
9 | | - |
10 | | --- This table stores information about plugins |
11 | | -CREATE TABLE IF NOT EXISTS plugins ( |
12 | | - plugin_types_rowid INTEGER, |
13 | | - name TEXT, -- Just the name of the plugin (unique) |
14 | | - uri TEXT UNIQUE, -- Contains the entities URI |
15 | | - repo_url TEXT, -- The full URL to the repository containing the entity |
16 | | - origin TEXT, -- Contains the partial path of the entity |
17 | | - version TEXT, -- The entity version |
18 | | - is_latest_version BOOLEAN, -- Whether the entity version is the latest |
19 | | - is_pseudo_version BOOLEAN, |
20 | | - abs_path TEXT UNIQUE, -- The full system path to the entity files (unique) |
21 | | - have BOOLEAN, -- Indicates if the entity is on the local machine |
22 | | - hash TEXT UNIQUE, -- The hash of the entity content for validation |
23 | | - exist BOOLEAN, -- Indicates if the repository was found |
24 | | - insert_date_time DATETIME DEFAULT CURRENT_TIMESTAMP, -- The date when the row was added |
25 | | - update_date_time DATETIME DEFAULT CURRENT_TIMESTAMP, -- The latest date when the row was updated |
26 | | - FOREIGN KEY (plugin_types_rowid) REFERENCES plugin_types(rowid) |
27 | | -); |
28 | | - |
29 | | -CREATE INDEX IF NOT EXISTS idx_plugins_name ON plugins(Name); |
30 | | -CREATE INDEX IF NOT EXISTS idx_plugins_repo_url ON plugins(repo_url); |
31 | | -CREATE INDEX IF NOT EXISTS idx_plugins_version ON plugins(Version); |
32 | | -CREATE INDEX IF NOT EXISTS idx_plugins_exist ON plugins(Exist); |
33 | | -CREATE INDEX IF NOT EXISTS idx_plugins_is_latest_version ON plugins(is_latest_version); |
34 | | -CREATE INDEX IF NOT EXISTS idx_plugins_is_pseudo_version ON plugins(is_pseudo_version); |
35 | | -CREATE INDEX IF NOT EXISTS idx_plugins_have ON plugins(Have); |
0 commit comments