"Initial commit"

This commit is contained in:
2017-10-19 11:57:28 +02:00
commit 33131ed07b
15 changed files with 558 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
CREATE TABLE Stock_users (
id serial primary key,
mail text not NULL,
password text not NULL,
name text not NULL
);
CREATE TABLE Stock_kits (
id serial primary key,
name text not NULL,
description text not NULL
);
CREATE TABLE Stock_providers (
id serial primary key,
address text not NULL,
mail text not NULL,
url text not NULL,
comment text not NULL
);
CREATE TABLE Stock_componants (
id serial primary key,
name text not NULL,
description text not NULL,
last_price NUMERIC not NULL,
mean_price NUMERIC not NULL,
quantity NUMERIC not NULL,
min_quantity NUMERIC not NULL,
place text not NULL,
provider_id integer REFERENCES Stock_providers(id)
);
CREATE TABLE Stock_kit_compositions (
id serial primary key,
kit_id integer REFERENCES Stock_kits(id),
componant_id integer REFERENCES Stock_componants(id),
quantity integer not NULL
);