diff options
| author | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2013-10-13 11:05:53 +0000 |
|---|---|---|
| committer | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2013-10-13 11:05:53 +0000 |
| commit | 147b3241bde44240de2ea14623a44c6f4207e353 (patch) | |
| tree | e51074fe9643b6ff7b098b18f1d430c06b2ff540 /pica-client/main.cpp | |
| parent | b09a0605693b0a350f4ee1a08896d638ebdd23ef (diff) | |
| download | pica-pica-147b3241bde44240de2ea14623a44c6f4207e353.tar.gz pica-pica-147b3241bde44240de2ea14623a44c6f4207e353.zip | |
contacts now have type - temporary, regular, blacklisted. On incoming connections from previously unknown peers new temporary contact record will be created
git-svn-id: svn://localhost/project_picapica/trunk@278 fb96df88-216d-11de-830c-f3023f12d8ac
Diffstat (limited to 'pica-client/main.cpp')
| -rw-r--r-- | pica-client/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pica-client/main.cpp b/pica-client/main.cpp index 5fbd0af..79b80c9 100644 --- a/pica-client/main.cpp +++ b/pica-client/main.cpp @@ -78,6 +78,7 @@ static bool create_database() name varchar(64), \ cert_pem text(2048), \ account_id blob not null, \ + type int not null default 1, \ primary key(id, account_id),\ foreign key(account_id) references accounts(id) on delete cascade\ );"); @@ -254,6 +255,7 @@ static bool update_database() name varchar(64), \ cert_pem text(2048), \ account_id blob not null, \ + type int not null default 1, \ primary key(id, account_id),\ foreign key(account_id) references accounts(id) on delete cascade\ );" @@ -339,7 +341,7 @@ static bool update_database() if (query.lastError().isValid()) goto showerror; - query.exec("insert into contacts select c.new_id, c.name, c.cert_pem, a.new_id from accounts_old_schemav1 as a, contacts_old_schemav1 as c on c.account_id = a.id where c.new_id is not null and a.new_id is not null"); + query.exec("insert into contacts select c.new_id, c.name, c.cert_pem, a.new_id, 1 from accounts_old_schemav1 as a, contacts_old_schemav1 as c on c.account_id = a.id where c.new_id is not null and a.new_id is not null"); if (query.lastError().isValid()) goto showerror; |
