sql: simplify properties
This commit is contained in:
parent
88d8da339a
commit
2e066b09a9
13
schema.sql
13
schema.sql
|
@ -105,23 +105,14 @@ CREATE TABLE IF NOT EXISTS attachement (
|
|||
UNIQUE (part, priority)
|
||||
);
|
||||
|
||||
-- property unit
|
||||
CREATE TABLE IF NOT EXISTS unit (
|
||||
id INTEGER AUTO_INCREMENT PRIMARY KEY, -- index
|
||||
name TEXT NOT NULL UNIQUE,
|
||||
symbol TEXT NOT NULL UNIQUE
|
||||
);
|
||||
|
||||
-- part property
|
||||
CREATE TABLE IF NOT EXISTS property (
|
||||
id INTEGER AUTO_INCREMENT PRIMARY KEY, -- index
|
||||
name TEXT NOT NULL, -- property name (min V, ...)
|
||||
unit INTEGER,
|
||||
FOREIGN KEY (unit) REFERENCES unit (id)
|
||||
name TEXT NOT NULL -- property name (min V, ...)
|
||||
);
|
||||
|
||||
-- property value
|
||||
CREATE TABLE IF NOT EXISTS poperty_value (
|
||||
CREATE TABLE IF NOT EXISTS property_value (
|
||||
id INTEGER AUTO_INCREMENT PRIMARY KEY, -- index
|
||||
part INTEGER NOT NULL, -- the part
|
||||
property INTEGER NOT NULL,
|
||||
|
|
Loading…
Reference in New Issue