Here's the list of errors. If I can get them fixed, I'll post workaround queries or possibly a diff to audio.install.

* warning: pg_query() [function.pg-query]: Query failed: ERROR: column "remote_size" of relation "d_audio" already exists in drupal/includes/database.pgsql.inc on line 139.
* user warning: query: ALTER TABLE d_audio ADD COLUMN remote_size int NOT NULL default 0 in drupal/includes/database.pgsql.inc on line 666.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "INNER" LINE 1: UPDATE d_audio a INNER JOIN d_audio_file af ON a.vid = af.vi... ^ in drupal/includes/database.pgsql.inc on line 139.
* user warning: query: UPDATE d_audio a INNER JOIN d_audio_file af ON a.vid = af.vid SET a.file_name = af.filename, a.file_path = af.filepath, a.file_mime = af.filemime, a.file_size = af.filesize in /home/severinghaus/drupal/modules/audio/audio.install on line 299.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: column "fid" contains null values in drupal/includes/database.pgsql.inc on line 139.
* user warning: query: ALTER TABLE d_audio ALTER fid SET NOT NULL in drupal/includes/database.pgsql.inc on line 674.

Update #5202
# Failed: ALTER TABLE {audio} ADD COLUMN remote_size int NOT NULL default 0
# Failed: UPDATE {audio} a INNER JOIN {audio_file} af ON a.vid = af.vid SET a.file_name = af.filename, a.file_path = af.filepath, a.file_mime = af.filemime, a.file_size = af.filesize

Update #6002
# Failed: ALTER TABLE {audio} ALTER fid SET NOT NULL

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

HorsePunchKid’s picture

Status: Active » Needs review
FileSize
2.53 KB

Here is a patch that fixes the various problems I had. I have only tested it against Postgres.

* removed duplicate {audio}.remote_size declaration
* don't make {audio}.fid NOT NULL until it's done being populated
* don't attempt to UPDATE {audio}.fid if nothing is inserted into {files}

HorsePunchKid’s picture

Unrelated, but it would also be nice if you did:

chmod a-x README.txt audio.*

HorsePunchKid’s picture

Liam Morland’s picture

Issue tags: +PostgreSQL