goby-database 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +14 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -75,12 +75,26 @@ class Project{
75
75
  //System table to contain generated image data
76
76
  this.create_table('system','images',['file_path TEXT','img_type TEXT','img BLOB']);
77
77
 
78
+ this.create_table('system','windows',[
79
+ 'id INTEGER NOT NULL PRIMARY KEY',
80
+ 'type TEXT',
81
+ 'open INT',
82
+ 'metadata TEXT'
83
+ ]);
84
+
85
+ this.db.prepare(`INSERT INTO system_windows
86
+ (type, open, metadata)
87
+ VALUES
88
+ ('home',0,'${JSON.stringify({pos:[null,null], size:[540,400]})}'),
89
+ ('hopper',0,'${JSON.stringify({pos:[null,null], size:[300,400]})}')`).run();
90
+
78
91
  // [TO ADD: special junction table for root objects to reference themselves in individual relation]
79
92
  this.create_table('system','junction_root',[
80
93
  'id_1 INTEGER',
81
94
  'id_2 INTEGER',
82
95
  'metadata TEXT'
83
96
  ]);
97
+
84
98
 
85
99
 
86
100
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "goby-database",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "This will hold the core better-sqlite3-powered application for creating and modifying goby databases",
5
5
  "main": "index.js",
6
6
  "scripts": {