Home | History | Annotate | Download | only in testUnsynced

Lines Matching full:phones

33 CREATE TABLE people (_id INTEGER PRIMARY KEY AUTOINCREMENT,_sync_account TEXT,_sync_id TEXT,_sync_time TEXT,_sync_version TEXT,_sync_local_id INTEGER,_sync_dirty INTEGER NOT NULL DEFAULT 0,_sync_mark INTEGER,name TEXT COLLATE LOCALIZED,notes TEXT COLLATE LOCALIZED,times_contacted INTEGER NOT NULL DEFAULT 0,last_time_contacted INTEGER,starred INTEGER NOT NULL DEFAULT 0,primary_phone INTEGER REFERENCES phones(_id),primary_organization INTEGER REFERENCES organizations(_id),primary_email INTEGER REFERENCES contact_methods(_id),photo_version TEXT,custom_ringtone TEXT,send_to_voicemail INTEGER,phonetic_name TEXT COLLATE LOCALIZED);
55 CREATE TABLE phones (_id INTEGER PRIMARY KEY AUTOINCREMENT,person INTEGER REFERENCES people(_id),type INTEGER NOT NULL,number TEXT,number_key TEXT,label TEXT,isprimary INTEGER NOT NULL DEFAULT 0);
56 INSERT INTO phones VALUES(1,1,2,'542-31',13245,NULL,1);
57 INSERT INTO phones VALUES(2,2,2,'716-5432',2345617,NULL,1);
58 INSERT INTO phones VALUES(3,4,2,'698-147-02',20741896,NULL,1);
70 INSERT INTO sqlite_sequence VALUES('phones',3);
86 CREATE INDEX phonesIndex1 ON phones (person);
87 CREATE INDEX phonesIndex2 ON phones (number_key);
90 CREATE TRIGGER contact_cleanup DELETE ON people BEGIN DELETE FROM peopleLookup WHERE source = old._id;DELETE FROM peopleLookupWithPhoneticName WHERE source = old._id;DELETE FROM phones WHERE person = old._id;DELETE FROM contact_methods WHERE person = old._id;DELETE FROM organizations WHERE person = old._id;DELETE FROM groupmembership WHERE person = old._id;DELETE FROM extensions WHERE person = old._id;END;
115 CREATE TRIGGER phones_INSERT_typeAndLabel AFTER INSERT ON phones WHEN (NEW.type != 0 AND NEW.label IS NOT NULL) OR (NEW.type = 0 AND NEW.label IS NULL) BEGIN SELECT RAISE (ABORT, 'exactly one of type or label must be set'); END;
116 CREATE TRIGGER phones_UPDATE_typeAndLabel AFTER UPDATE ON phones WHEN (NEW.type != 0 AND NEW.label IS NOT NULL) OR (NEW.type = 0 AND NEW.label IS NULL) BEGIN SELECT RAISE (ABORT, 'exactly one of type or label must be set'); END;
117 CREATE TRIGGER phones_delete DELETE ON phones BEGIN UPDATE people SET _sync_dirty=1 WHERE people._id=old.person;END;
118 CREATE TRIGGER phones_insert INSERT ON phones BEGIN UPDATE people SET _sync_dirty=1 WHERE people._id=new.person;END;
119 CREATE TRIGGER phones_update UPDATE ON phones BEGIN UPDATE people SET _sync_dirty=1 WHERE people._id=old.person;END;
120 CREATE TRIGGER timestamp_trigger1 AFTER UPDATE ON phones BEGIN UPDATE voice_dialer_timestamp SET timestamp=strftime('%s', 'now') WHERE _id=1;END;