/ src / emc / toolstore / sql / schema-simple.sql
schema-simple.sql
 1  
 2  BEGIN TRANSACTION;
 3  
 4  DROP TABLE IF EXISTS "tools";
 5  
 6  
 7  CREATE TABLE "tools" (
 8      toolno	INTEGER PRIMARY KEY,
 9      pocket	INTEGER,
10      diameter 	REAL DEFAULT (0.0),
11      backangle   REAL DEFAULT (0.0),
12      frontangle  REAL DEFAULT (0.0),
13      orientation INTEGER DEFAULT (0.0),
14      comment	 TEXT DEFAULT (NULL),
15      x_offset REAL DEFAULT (0.0),
16      y_offset REAL DEFAULT (0.0),
17      z_offset REAL DEFAULT (0.0),
18      a_offset REAL DEFAULT (0.0),
19      b_offset REAL DEFAULT (0.0),
20      c_offset REAL DEFAULT (0.0),
21      u_offset REAL DEFAULT (0.0),
22      v_offset REAL DEFAULT (0.0),
23      w_offset REAL DEFAULT (0.0)
24  );
25  
26  
27  
28  INSERT INTO "tools" VALUES (1,2,4.0, 0.0,0.0,0.0,"tool1",1.2,0.0,3.7,0.0,0.0,0.0,0.0,0.0,0.0);
29  INSERT INTO "tools" VALUES (2,1,2.0, 0.0,0.0,0.0,"tool2",0.2,0.0,1.2,0.0,0.0,0.0,0.0,0.0,0.0);
30  INSERT INTO "tools" VALUES (3,7,3.3, 0.0,0.0,0.0,"tool3",3.2,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0);
31  INSERT INTO "tools" VALUES (4,3,1.2, 0.0,0.0,0.0,"tool4",0.0,0.0,5.9,0.0,0.0,0.0,0.0,0.0,0.0);
32  INSERT INTO "tools" VALUES (5,5,6.2, 0.0,0.0,0.0,"tool5",0.0,0.0,1.1,0.0,0.0,0.0,0.0,0.0,0.0);
33  INSERT INTO "tools" VALUES (6,9,1.9, 0.0,0.0,0.0,"tool6",0.0,0.0,3.4,0.0,0.0,0.0,0.0,0.0,0.0);
34  INSERT INTO "tools" VALUES (7,8,0.3, 0.0,0.0,0.0,"tool7",0.0,0.0,1.7,0.0,0.0,0.0,0.0,0.0,0.0);
35  INSERT INTO "tools" VALUES (8,11,2.50, 0.0,0.0,0.0,"tool8",0.0,0.0,2.7,0.0,0.0,0.0,0.0,0.0,0.0);
36  INSERT INTO "tools" VALUES (9,24,1.1, 0.0,0.0,0.0,"tool9",0.0,0.0,4.9,0.0,0.0,0.0,0.0,0.0,0.0);
37  
38  
39  
40  CREATE TABLE "state" (
41      toolno	INTEGER,
42      pocket	INTEGER
43  
44  );
45  
46  INSERT INTO "state" VALUES (6,9);
47  
48  
49  
50  COMMIT;