Value Services implementiert Teil 1
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
-- 1. Globale Sequence anlegen
|
||||
CREATE SEQUENCE global_id_seq
|
||||
START 1000000
|
||||
INCREMENT 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
-- 2. Value Table
|
||||
-- Value Table
|
||||
CREATE TABLE IF NOT EXISTS values (
|
||||
id BIGINT PRIMARY KEY DEFAULT nextval('global_id_seq'),
|
||||
Label TEXT,
|
||||
description TEXT,
|
||||
propertyId BIGINT
|
||||
);
|
||||
|
||||
-- Property Table
|
||||
CREATE TABLE IF NOT EXISTS propertys (
|
||||
id BIGINT PRIMARY KEY DEFAULT nextval('global_id_seq'),
|
||||
Label TEXT,
|
||||
description TEXT,
|
||||
propertyTypeId BIGINT,
|
||||
productId BIGINT,
|
||||
productGroupId BIGINT
|
||||
);
|
||||
|
||||
-- PropertyType Table
|
||||
CREATE TABLE IF NOT EXISTS propertyTypes(
|
||||
id BIGINT PRIMARY KEY DEFAULT nextval('global_id_seq'),
|
||||
Label TEXT,
|
||||
description TEXT,
|
||||
propertyId BIGINT
|
||||
);
|
||||
|
||||
-- PropertyTypeGroupTable
|
||||
CREATE TABLE IF NOT EXISTS propertyTypeGroups (
|
||||
id BIGINT PRIMARY KEY DEFAULT nextval('global_id_seq'),
|
||||
Label TEXT,
|
||||
description TEXT,
|
||||
parentGroupId BIGINT
|
||||
);
|
||||
|
||||
-- 3. Product Tables
|
||||
-- Product Table
|
||||
CREATE TABLE IF NOT EXISTS products (
|
||||
id BIGINT PRIMARY KEY DEFAULT nextval('global_id_seq'),
|
||||
Label TEXT,
|
||||
externalId TEXT,
|
||||
description TEXT,
|
||||
productGroupId BIGINT
|
||||
);
|
||||
|
||||
-- ProductGroup Table
|
||||
CREATE TABLE IF NOT EXISTS productGroups (
|
||||
id BIGINT PRIMARY KEY DEFAULT nextval('global_id_seq'),
|
||||
Label TEXT,
|
||||
description TEXT,
|
||||
parentGroupId BIGINT
|
||||
);
|
||||
|
||||
-- Media Table
|
||||
CREATE TABLE IF NOT EXISTS media (
|
||||
id BIGINT PRIMARY KEY DEFAULT nextval('global_id_seq'),
|
||||
Label TEXT,
|
||||
description TEXT,
|
||||
media TEXT,
|
||||
mediaType TEXT,
|
||||
externalId BIGINT
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user