I looked at the code you linked above and extracted the necessary information for one example. Note: the order is exactly as in the script (if I didn't confused it).
CREATE TABLE categories(id INTEGER PRIMARY KEY,name TEXT UNIQUE);
INSERT INTO "categories" VALUES(6,'site_analytics');
CREATE TABLE companies (id TEXT NOT NULL UNIQUE, name TEXT NOT NULL, description TEXT, privacy_url TEXT, website_url TEXT, ghostery_id TEXT, country VARCHAR (2), privacy_contact TEXT, notes TEXT);
INSERT INTO "companies" VALUES('1000mercis','1000mercis','\"1000mercis Group, a pioneer in interactive advertising and marketing, provides innovative solutions for companies willing to optimise their customer acquisition and retention through interactive media (Internet, mobile phones and tablets).\"','http://ads.1000mercis.com/fr.html','http://www.1000mercis.com/','2262',NULL,'contactUSA@1000mercis.com','11/14/12 CT: Description Source: Website\r\n09/20/16 JW: Disabled in lab. Appnexus wont white list our lab and cant properly test.\r\n9/18/17 CH: Updated Privacy Policy URL: from none to http://mmtro.com/privacy/fr/\r\nUpdated Privacy Contact Form URL: from none to http://www.1000mercis.com/#!/contact');
CREATE TABLE tracker_domains (tracker TEXT NOT NULL, domain TEXT UNIQUE NOT NULL, notes TEXT, FOREIGN KEY (tracker) REFERENCES trackers (id));
INSERT INTO "tracker_domains" VALUES('1000mercis','mmtro.com',NULL);
CREATE TABLE trackers (id TEXT NOT NULL UNIQUE, name TEXT NOT NULL, category_id INTEGER, website_url TEXT, company_id TEXT, ghostery_id TEXT, notes TEXT, alias TEXT REFERENCES trackers (id), FOREIGN KEY (category_id) REFERENCES categories (id), FOREIGN KEY (company_id) REFERENCES companies (id));
INSERT INTO "trackers" VALUES('1000mercis','1000mercis',6,NULL,'1000mercis','2662',NULL,NULL);
The issue happens because table tracker_domains
referenced table trackers
which does not exist so far. But before tackers
is created, data should already be inserted into tracker_domains
The way it works is
CREATE TABLE categories(id INTEGER PRIMARY KEY,name TEXT UNIQUE);
INSERT INTO "categories" VALUES(6,'site_analytics');
CREATE TABLE companies (id TEXT NOT NULL UNIQUE, name TEXT NOT NULL, description TEXT, privacy_url TEXT, website_url TEXT, ghostery_id TEXT, country VARCHAR (2), privacy_contact TEXT, notes TEXT);
INSERT INTO "companies" VALUES('1000mercis','1000mercis','\"1000mercis Group, a pioneer in interactive advertising and marketing, provides innovative solutions for companies willing to optimise their customer acquisition and retention through interactive media (Internet, mobile phones and tablets).\"','http://ads.1000mercis.com/fr.html','http://www.1000mercis.com/','2262',NULL,'contactUSA@1000mercis.com','11/14/12 CT: Description Source: Website\r\n09/20/16 JW: Disabled in lab. Appnexus wont white list our lab and cant properly test.\r\n9/18/17 CH: Updated Privacy Policy URL: from none to http://mmtro.com/privacy/fr/\r\nUpdated Privacy Contact Form URL: from none to http://www.1000mercis.com/#!/contact');
CREATE TABLE tracker_domains (tracker TEXT NOT NULL, domain TEXT UNIQUE NOT NULL, notes TEXT, FOREIGN KEY (tracker) REFERENCES trackers (id));
CREATE TABLE trackers (id TEXT NOT NULL UNIQUE, name TEXT NOT NULL, category_id INTEGER, website_url TEXT, company_id TEXT, ghostery_id TEXT, notes TEXT, alias TEXT REFERENCES trackers (id), FOREIGN KEY (category_id) REFERENCES categories (id), FOREIGN KEY (company_id) REFERENCES companies (id));
INSERT INTO "trackers" VALUES('1000mercis','1000mercis',6,NULL,'1000mercis','2662',NULL,NULL);
INSERT INTO "tracker_domains" VALUES('1000mercis','mmtro.com',NULL);
Tested with latest FTL
version.
I'm not sure why "old" sqlite versions did ignore the missing tables but I would not consider that a feature but a bug which is now fixed.