Have following table:

CREATE TABLE ip_addr 
(
/*! Person identificator (PID) %%a */ pid INTEGER PRIMARY KEY NOT NULL,
/*! IP address %%b */ ip_addr VARCHAR (16) NOT NULL,
/*! Status: 0 - Allowed, Unassigned to specific customer (blocked) */
/*! Status: 1 - Allowed, Asigned to concrete customer */
/*! Status: 2 - Disallowed, Assigned to blocked user */
/*! Status: 3 - Disallowed, Assigned to history user */
/*! Status of IP address %%c */ ip_status INTEGER NOT NULL,
/*! Type: 1 - Private */
/*! Type: 2 - Public */
/*! Type: 3 - IPv6 */
/*! Type of IP address %%d */ ip_type INTEGER NOT NULL,
/*! Date of blocking %%e */ blocked_at INTEGER,
/*! Blocking note %%f */ blocking_note VARCHAR
);
)


If inserting row containing PID already exist in table, sqlite generate %subj% 
error. But there is not such constraint in database definition. Did I miss 
something?

L. 


Reply via email to