You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/local/lib/node_modules/tuql/dist/utils/index.js:57
throw Error(`Model with ${key} does not exist`);
^
Error: Model with devices does not exist
at findModelKey (/usr/local/lib/node_modules/tuql/dist/utils/index.js:57:9)
at /usr/local/lib/node_modules/tuql/dist/builders/schema.js:107:47
at Array.forEach (<anonymous>)
at /usr/local/lib/node_modules/tuql/dist/builders/schema.js:100:18
OK so I'm not exactly sure what I did to fix it but _ and uppercase characerts in the table names or column names was causing it to error out for some reason cause this worked:
PRAGMA foreignkeys=OFF;
BEGIN TRANSACTION;
CREATE TABLE cybermen ( id INTEGER PRIMARY KEY AUTOINCREMENT, cybermenid TEXT, time INTEGER, latitude INTEGER, longitude INTEGER, altitude INTEGER, llaccuracy INTEGER, altaccuracy INTEGER, platform TEXT, planetid TEXT, osversion TEXT, cybermenmodel TEXT, deviceid TEXT, trackingenabled INTEGER );
INSERT INTO cybermen VALUES(1,'5505929089744357',1646332890,-58.012831404017347835,41.831462491840198936,54327.88482743823988,78.102049147571591448,60.14073751739705642,'cybermos','A-996','COS 10.8.5','T-240','4717defa-a82c-4ac3-9b3d-620dc247fb3d',1);
CREATE TABLE sentients ( id INTEGER PRIMARY KEY AUTOINCREMENT, sentientid TEXT, time INTEGER, latitude INTEGER, longitude INTEGER, altitude INTEGER, llaccuracy INTEGER, altaccuracy INTEGER, platform TEXT, planetid TEXT, osversion TEXT, speciesid TEXT, deviceid TEXT, trackingenabled INTEGER );
INSERT INTO sentients VALUES(1,'06466350783550256',1646332892,-34.706857617227065305,-177.25406639115001894,3273.0915289905128701,64.153259426315315749,37.280746329670137128,'nanodnaos','2-362','COS 9.1.6','S-545','a05c3f61-e90a-4219-9f2a-a74c71fd67e8',1);
CREATE TABLE planets ( id INTEGER PRIMARY KEY AUTOINCREMENT, planetid TEXT, aliases TEXT );
INSERT INTO planets VALUES(1,'A-245','Aglaia');
CREATE TABLE sentientspecies ( id INTEGER PRIMARY KEY AUTOINCREMENT, speciesid TEXT, aliases TEXT );
INSERT INTO sentientspecies VALUES(1,'X-209','Xad');
COMMIT;
Trying to figure out this error.
This is from
tuql/src/utils/index.js
Line 42 in 5e5c09a
Here is a small sample of my simulated database:
Any idea whats going on?
Error: Model with devices does not exist
Whats up with a key name of devices? I dont have anything named devices in my db.The text was updated successfully, but these errors were encountered: