[horde] Ansel fails to create gallery issues MDB2 Error: Invalid Number on Postgresql 8.4 backend
Bill Day
williamson.day at gmail.com
Wed Apr 29 05:43:50 UTC 2009
Spoke too soon. I was able to create a gallery, but now I get the following
error when I try to upload a photo:
There was a problem saving the photo: MDB2 Error: null value violates
not-null constraint
Incidentally, for the record, the following is my record of tinkering with
the first line of the script:
horde=# ALTER TABLE ansel_shares ALTER attribute_view_mode TYPE
VARCHAR(255);
ALTER TABLE
horde=# ALTER TABLE ansel_shares SET DEFAULT "Normal" NOT NULL;
ERROR: syntax error at or near "DEFAULT"
LINE 1: ALTER TABLE ansel_shares SET DEFAULT "Normal" NOT NULL;
^
horde=# \h ALTER TABLE
horde=# \d ansel_shares
horde=# UPDATE ansel_shares SET attribute_view_mode = 'Normal' WHERE
attribute_view_mode = '0';
UPDATE 0
horde=# UPDATE ansel_shares SET attribute_view_mode = 'Date' WHERE
attribute_view_mode = '1';
UPDATE 0
horde=# ALTER TABLE ansel_shares CHANGE attribute_view_mode
attribute_view_mode VARCHAR(255) DEFAULT 'Normal' NOT NULL;
ERROR: syntax error at or near "CHANGE"
LINE 1: ALTER TABLE ansel_shares CHANGE attribute_view_mode attribut...
^
horde=# ALTER TABLE ansel_shares ALTER attribute_view_mode
attribute_view_mode VARCHAR(255) DEFAULT 'Normal' NOT NULL;
ERROR: syntax error at or near "attribute_view_mode"
LINE 1: ...LTER TABLE ansel_shares ALTER attribute_view_mode attribute_...
^
horde=# ALTER TABLE ansel_shares ALTER attribute_view_mode VARCHAR(255)
DEFAULT 'Normal' NOT NULL;
ERROR: syntax error at or near "VARCHAR"
LINE 1: ...LTER TABLE ansel_shares ALTER attribute_view_mode VARCHAR(25...
^
horde=# ALTER TABLE ansel_shares ALTER attribute_view_mode TYPE VARCHAR(255)
DEFAULT 'Normal' NOT NULL;
ERROR: syntax error at or near "DEFAULT"
LINE 1: ...hares ALTER attribute_view_mode TYPE VARCHAR(255) DEFAULT 'N...
^
horde=# ALTER TABLE ansel_shares ALTER attribute_view_mode TYPE VARCHAR(255)
AND DEFAULT 'Normal' NOT NULL;
ERROR: syntax error at or near "AND"
LINE 1: ...hares ALTER attribute_view_mode TYPE VARCHAR(255) AND DEFAUL...
^
horde=# ALTER TABLE ansel_shares ALTER attribute_view_mode TYPE VARCHAR(255)
SET DEFAULT 'Normal' NOT NULL;
ERROR: syntax error at or near "SET"
LINE 1: ...hares ALTER attribute_view_mode TYPE VARCHAR(255) SET DEFAUL...
^
horde=# ALTER TABLE ansel_shares ALTER attribute_view_mode SET DEFAULT
'Normal' NOT NULL;
ERROR: syntax error at or near "NULL"
LINE 1: ...res ALTER attribute_view_mode SET DEFAULT 'Normal' NOT NULL;
^
horde=# ALTER TABLE ansel_shares ALTER attribute_view_mode SET DEFAULT
'Normal' 'NOT NULL';
ERROR: syntax error at or near "'NOT NULL'"
LINE 1: ...es ALTER attribute_view_mode SET DEFAULT 'Normal' 'NOT NULL'...
^
horde=# ALTER TABLE ansel_shares ALTER attribute_view_mode SET DEFAULT
'Normal';
ALTER TABLE
horde=# ALTER TABLE ansel_shares ALTER attribute_view_mode SET DEFAULT NOT
NULL;
ALTER TABLE
horde=#
On Wed, Apr 29, 2009 at 1:22 AM, Bill Day <williamson.day at gmail.com> wrote:
> Mike,
>
> Thanks very much. One of the things that makes Horde great is the
> responsiveness of the developers in addition to the quality of the software.
>
> I did run into a couple of syntax errors in the first line of the script
> when I tried to run it.
>
> I changed the first line to read as follows:
>
> ALTER TABLE ansel_shares ALTER attribute_view_mode TYPE VARCHAR(255);
>
> That seemed to work better for me, and I was able to create a new gallery.
> I am not an SQL guru by any stretch of the imagination, however, so caveat
> lector!
>
> Sincerely,
>
> Bill
>
>
> On Tue, Apr 28, 2009 at 9:42 AM, Michael Rubinsky <mrubinsk at horde.org>wrote:
>
>>
>> Quoting Bill Day <williamson.day at gmail.com>:
>>
>> I am trying to set up a gallery for my young daughters in the stable
>>> release
>>> of Ansel with Postgresql 8.4 as a backend, and I keep getting the
>>> following
>>> errors when I try to create a gallery. I have made sure that the pear
>>> modules included with horde are in my path. Any suggestions?
>>>
>>
>> Yup. The postgres database creation script contained an incorrect field
>> definition for one of the fields. There is a (just added) upgrade script to
>> run located in CVS.
>>
>>
>> http://cvs.horde.org/co.php/ansel/scripts/upgrades/2009-04-14_fix_view_mode.pgsql.sql?r=1.1.2.1
>>
>>
>>
>> Thanks,
>> mike
>>
>> --
>> The Horde Project (www.horde.org)
>> mrubinsk at horde.org
>>
>> "Time just hates me. That's why it made me an adult." - Josh Joplin
>> --
>> Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
>> Frequently Asked Questions: http://horde.org/faq/
>> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>>
>
>
>
> --
> Bill Day
> williamson.day at gmail.com
> PGP Fingerprint: EE5D DE55 9EF1 E012 7417
> A5F1 1D7D 0847 7785 1146
>
--
Bill Day
williamson.day at gmail.com
PGP Fingerprint: EE5D DE55 9EF1 E012 7417
A5F1 1D7D 0847 7785 1146
More information about the horde
mailing list