6.0.0-beta1
7/27/25

[#2206] error when trying to add file in /scripts to database
Summary error when trying to add file in /scripts to database
Queue Sam
Queue Version HEAD
Type Bug
State Resolved
Priority 3. High
Owners
Requester atlas (at) literateminds (dot) com
Created 06/30/2005 (7332 days ago)
Due
Updated 07/01/2005 (7331 days ago)
Assigned
Resolved 07/01/2005 (7331 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
07/01/2005 01:12:15 AM Matt Selsky Comment #2
State ⇒ Resolved
Reply to this comment
Fixed in CVS.  Thanks.
06/30/2005 04:34:49 PM atlas (at) literateminds (dot) com Comment #1
State ⇒ Unconfirmed
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ error when trying to add file in /scripts to database
Queue ⇒ Sam
Reply to this comment
im using mysql 4.1.x on debian sarge (3.1)

horde sam and other modules are all HEAD tag from CVS as of today. 
06-30-2005 10:30 am MST.



Here are my steps:



cd horde

cvs co sam

cd sam/scripts/sql

mysql -U horde < amavisd_sql.mysql.sql



and I get a SQL error back saying that there was an error near 'NOT 
NULL and to check my documenation yaddy yadda...'



It looks like its referring to the id column as its specifying default 
without a value for it,

shown here:



CREATE TABLE policy (

   id                   INT UNSIGNED DEFAULT NOT NULL auto_increment,

   policy_name          VARCHAR(255), -- not used by amavisd-new



   virus_lover          VARCHAR(1),      -- Y/N

   spam_lover           VARCHAR(1),      -- Y/N  (optional field)

   banned_files_lover   VARCHAR(1),      -- Y/N  (optional field)



so I dropped the tables it already created and took out the default 
(as im not sure why there would be a default value in a serial type 
field)  and ran it.. it worked :D



Hope this helps =)

Take Care guys and thanks for such a rad framework




Saved Queries