forked from LearnDeepMilwaukee/valuenetwork
-
Notifications
You must be signed in to change notification settings - Fork 0
/
facets2.sql
36 lines (35 loc) · 3.13 KB
/
facets2.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
DROP TABLE "valueaccounting_facet";
CREATE TABLE "valueaccounting_facet" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(32) NOT NULL UNIQUE, "description" text NULL, "clas" varchar(20) NULL);
INSERT INTO "valueaccounting_facet" VALUES(1,'Material','This is a set of material resource types or facet values, in coordination with the General common tree of Material Artwork Types (physical items). This facet relates a General model class which manages the subtypes as a tree.','Material_Type');
INSERT INTO "valueaccounting_facet" VALUES(2,'Types of Work','This is a set of Skill resource types or facet values, in coordination with the General common tree of Jobs (arts, verbs). This facet relates a Work model class which manages the subtypes as a tree.','Skill_Type');
INSERT INTO "valueaccounting_facet" VALUES(3,'Non-material','This is a set of non-material resource types or facet values, in coordination with the General common tree of Non-material Artwork Types (physical items). This facet relates a General model class which manages the subtypes as a tree.','Nonmaterial_Type');
INSERT INTO "valueaccounting_facet" VALUES(4,'Currency','This facet is to group types of currencies, so a resource type can act as a currency of certain type if wears any of this values','Currency_Type');
COMMIT;
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
DROP TABLE "valueaccounting_facetvalue";
CREATE TABLE "valueaccounting_facetvalue" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "value" varchar(32) NOT NULL, "description" text NULL, "facet_id" integer NOT NULL REFERENCES "valueaccounting_facet" ("id"), UNIQUE ("facet_id", "value"));
INSERT INTO "valueaccounting_facetvalue" VALUES(1,'Product','',1);
INSERT INTO "valueaccounting_facetvalue" VALUES(8,'Space','',1);
INSERT INTO "valueaccounting_facetvalue" VALUES(9,'Raw material','',1);
INSERT INTO "valueaccounting_facetvalue" VALUES(10,'Tool','',1);
INSERT INTO "valueaccounting_facetvalue" VALUES(12,'Making','',2);
INSERT INTO "valueaccounting_facetvalue" VALUES(13,'Communicating','',2);
INSERT INTO "valueaccounting_facetvalue" VALUES(14,'LifeCareing','',2);
INSERT INTO "valueaccounting_facetvalue" VALUES(16,'Visual','',3);
INSERT INTO "valueaccounting_facetvalue" VALUES(17,'Formation','',3);
INSERT INTO "valueaccounting_facetvalue" VALUES(18,'Sound','',3);
INSERT INTO "valueaccounting_facetvalue" VALUES(19,'Text','',3);
INSERT INTO "valueaccounting_facetvalue" VALUES(21,'Food''n''Drinks','',1);
INSERT INTO "valueaccounting_facetvalue" VALUES(22,'Digital','',3);
INSERT INTO "valueaccounting_facetvalue" VALUES(23,'Service','',3);
INSERT INTO "valueaccounting_facetvalue" VALUES(24,'Money','',3);
INSERT INTO "valueaccounting_facetvalue" VALUES(25,'Transporting','',2);
INSERT INTO "valueaccounting_facetvalue" VALUES(26,'Fair currency','',4);
INSERT INTO "valueaccounting_facetvalue" VALUES(27,'Fiat currency','',4);
INSERT INTO "valueaccounting_facetvalue" VALUES(28,'Social currency','',4);
INSERT INTO "valueaccounting_facetvalue" VALUES(29,'Crypto currency','',4);
CREATE INDEX "valueaccounting_facetvalue_cf37ed58" ON "valueaccounting_facetvalue" ("facet_id");
COMMIT;