Home | History | Annotate | Download | only in test1

Lines Matching refs:phones

53 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);
78 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);
79 INSERT INTO phones VALUES(1,2,1,'1-800-466-4411',11446640081,NULL,1);
80 INSERT INTO phones VALUES(2,2,3,2345678901,1098765432,NULL,0);
81 INSERT INTO phones VALUES(3,2,2,3456789012,2109876543,NULL,0);
82 INSERT INTO phones VALUES(4,2,5,4567890123,3210987654,NULL,0);
83 INSERT INTO phones VALUES(5,2,4,5678901234,4321098765,NULL,0);
84 INSERT INTO phones VALUES(6,2,6,6789012345,5432109876,NULL,0);
85 INSERT INTO phones VALUES(7,2,7,7890123456,6543210987,NULL,0);
86 INSERT INTO phones VALUES(8,3,2,'555-555-5555',5555555555,NULL,0);
87 INSERT INTO phones VALUES(11,2,1,1234567890,0987654321,NULL,0);
88 INSERT INTO phones VALUES(16,11,2,'1-987-4563',36547891,NULL,1);
100 INSERT INTO sqlite_sequence VALUES('phones',16);
118 CREATE INDEX phonesIndex1 ON phones (person);
119 CREATE INDEX phonesIndex2 ON phones (number_key);
122 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;
147 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;
148 CREATE TRIGGER phones_UPDATE_typeAndLabel AFTER UPDATE ON phones
149 CREATE TRIGGER phones_delete DELETE ON phones BEGIN UPDATE people SET _sync_dirty=1 WHERE people._id=old.person;END;
150 CREATE TRIGGER phones_insert INSERT ON phones BEGIN UPDATE people SET _sync_dirty=1 WHERE people._id=new.person;END;
151 CREATE TRIGGER phones_update UPDATE ON phones BEGIN UPDATE people SET _sync_dirty=1 WHERE people._id=old.person;END;
152 CREATE TRIGGER timestamp_trigger1 AFTER UPDATE ON phones BEGIN UPDATE voice_dialer_timestamp SET timestamp=strftime('%s', 'now') WHERE _id=1;END;