1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24

content / test / data / interest_group / autogenSchemaV28.sql [blame]

PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR);
INSERT INTO meta VALUES('mmap_status','-1');
INSERT INTO meta VALUES('version','28');
INSERT INTO meta VALUES('last_compatible_version','28');
CREATE TABLE interest_groups(expiration INTEGER NOT NULL,last_updated INTEGER NOT NULL,next_update_after INTEGER NOT NULL,owner TEXT NOT NULL,joining_origin TEXT NOT NULL,exact_join_time INTEGER NOT NULL,name TEXT NOT NULL,priority DOUBLE NOT NULL,enable_bidding_signals_prioritization INTEGER NOT NULL,priority_vector TEXT NOT NULL,priority_signals_overrides TEXT NOT NULL,seller_capabilities TEXT NOT NULL,all_sellers_capabilities INTEGER NOT NULL,execution_mode INTEGER NOT NULL,joining_url TEXT NOT NULL,bidding_url TEXT NOT NULL,bidding_wasm_helper_url TEXT NOT NULL,update_url TEXT NOT NULL,trusted_bidding_signals_url TEXT NOT NULL,trusted_bidding_signals_keys TEXT NOT NULL,trusted_bidding_signals_slot_size_mode INTEGER NOT NULL,max_trusted_bidding_signals_url_length INTEGER NOT NULL,trusted_bidding_signals_coordinator TEXT,user_bidding_signals TEXT,ads_pb BLOB NOT NULL,ad_components_pb BLOB NOT NULL,ad_sizes TEXT NOT NULL,size_groups TEXT NOT NULL,auction_server_request_flags INTEGER NOT NULL,additional_bid_key BLOB NOT NULL,aggregation_coordinator_origin TEXT,storage_size INTEGER NOT NULL,last_k_anon_updated_time INTEGER NOT NULL,kanon_keys BLOB NOT NULL,PRIMARY KEY(owner,name));
INSERT INTO interest_groups VALUES(11648562057470000,11645970057470000,-9223372036854775808,'https://full.example.com','https://full.example.com',11645970057470000,'full',1.0,1,'{"a":2.0,"b":-2.2}','{"a":-2.0,"c":10.0,"d":1.2}','{"https://full.example.com":"1","https://partial.example.com":"2"}',3,2,'https://full.example.com/','https://full.example.com/bid','https://full.example.com/bid_wasm','https://full.example.com/update','https://full.example.com/signals','["a","b","c","d"]',2,8000,'https://coordinator.test','foo',X'0a6a0a1c68747470733a2f2f66756c6c2e6578616d706c652e636f6d2f616431120767726f75705f311a096d6574616461746131220862757965725f69642a097368617265645f6964320a616452656e64657249643a1568747470733a2f2f7265706f7274696e672e636f6d0a3d0a1c68747470733a2f2f66756c6c2e6578616d706c652e636f6d2f616432120767726f75705f321a096d6574616461746132220962757965725f696432',X'0a490a2568747470733a2f2f66756c6c2e6578616d706c652e636f6d2f6164636f6d706f6e656e7431120767726f75705f311a0a6d657461646174613163320b616452656e6465724964320a3c0a2568747470733a2f2f66756c6c2e6578616d706c652e636f6d2f6164636f6d706f6e656e7432120767726f75705f321a0a6d657461646174613263','{"size_1":"{\"height\":150.0,\"height_units\":1,\"width\":300.0,\"width_units\":1}","size_2":"{\"height\":480.0,\"height_units\":1,\"width\":640.0,\"width_units\":1}","size_3":"{\"height\":100.0,\"height_units\":2,\"width\":100.0,\"width_units\":2}"}','{"group_1":"[\"size_1\"]","group_2":"[\"size_1\",\"size_2\"]","group_3":"[\"size_3\"]"}',3,X'','https://coordinator.test',739,-9223372036854775808,X'');
CREATE TABLE joined_k_anon(hashed_key BLOB NOT NULL,last_reported_to_anon_server_time INTEGER NOT NULL,PRIMARY KEY(hashed_key));
CREATE TABLE join_history(owner TEXT NOT NULL,name TEXT NOT NULL,join_time INTEGER NOT NULL,count INTEGER NOT NULL,PRIMARY KEY(owner, name, join_time) FOREIGN KEY(owner,name) REFERENCES interest_groups);
INSERT INTO join_history VALUES('https://full.example.com','full',11645942400000000,1);
CREATE TABLE bid_history(owner TEXT NOT NULL,name TEXT NOT NULL,bid_time INTEGER NOT NULL,count INTEGER NOT NULL,PRIMARY KEY(owner, name, bid_time) FOREIGN KEY(owner,name) REFERENCES interest_groups);
CREATE TABLE win_history(owner TEXT NOT NULL,name TEXT NOT NULL,win_time INTEGER NOT NULL,ad TEXT NOT NULL,FOREIGN KEY(owner,name) REFERENCES interest_groups);
CREATE TABLE lockout_debugging_only_report(id INTEGER NOT NULL,last_report_sent_time INTEGER NOT NULL,PRIMARY KEY(id));
CREATE TABLE cooldown_debugging_only_report(origin TEXT NOT NULL,starting_time INTEGER NOT NULL,type INTEGER NOT NULL,PRIMARY KEY(origin));
CREATE TABLE bidding_and_auction_server_keys(coordinator TEXT NOT NULL,keys BLOB NOT NULL,expiration INTEGER NOT NULL,PRIMARY KEY(coordinator));
CREATE INDEX interest_group_expiration ON interest_groups(expiration DESC, owner, name);
CREATE INDEX interest_group_owner ON interest_groups(owner,expiration DESC,next_update_after ASC,name);
CREATE INDEX interest_group_owner_and_type ON interest_groups(LENGTH(additional_bid_key) == 0,owner,expiration DESC,name);
CREATE INDEX interest_group_owner_size ON interest_groups(owner,expiration DESC,storage_size);
CREATE INDEX interest_group_joining_origin ON interest_groups(joining_origin, expiration DESC, owner, name);
CREATE INDEX k_anon_last_server_time_idx ON joined_k_anon(last_reported_to_anon_server_time DESC);
CREATE INDEX win_history_index ON win_history(owner,name,win_time DESC);
COMMIT;