-- drop table if exists actors; -- drop table if exists asnames; -- -- crashes, downloads, entity_properties, pings, property_keys, vists; -- drop table if exists crashes; -- drop table if exists downloads; -- drop table if exists entity_properties; -- drop table if exists pings; -- drop table if exists property_keys; -- drop table if exists visits; -- CREATE TABLE IF NOT EXISTS actors ( -- id INTEGER PRIMARY KEY AUTOINCREMENT, -- ip TEXT NOT NULL, -- asn INTEGER NOT NULL, -- colo TEXT NOT NULL, -- continent TEXT NOT NULL, -- country TEXT NOT NULL, -- city TEXT NOT NULL, -- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP -- ); -- CREATE TABLE IF NOT EXISTS asnames ( -- asn INTEGER PRIMARY KEY, -- name TEXT NOT NULL, -- country TEXT NOT NULL -- ); -- Alter table to add browser agent and os to the actors table --ALTER TABLE actors ADD COLUMN browser TEXT; --ALTER TABLE actors ADD COLUMN os TEXT; -- properties.push(("category".to_string(), res.category.to_string())); -- properties.push(("name".to_string(), res.name.to_string())); -- // res.browser_type -- properties.push(("version".to_string(), res.version.to_string())); -- // res.os_version -- properties.push(("vendor".to_string(), res.vendor.to_string())); -- // res.vendor -- properties.push(("os_version".to_string(), res.os_version.to_string())); -- // res.version -- properties.push(("browser_type".to_string(), res.browser_type.to_string())); -- ALTER TABLE actors ADD COLUMN category TEXT; -- ALTER TABLE actors ADD COLUMN name TEXT; -- ALTER TABLE actors ADD COLUMN version TEXT; -- ALTER TABLE actors ADD COLUMN vendor TEXT; -- ALTER TABLE actors ADD COLUMN os_version TEXT; -- ALTER TABLE actors ADD COLUMN browser_type TEXT; -- user_agent TEXT NOT NULL, --ALTER TABLE actors ADD COLUMN user_agent TEXT;