Audio fails to install on postgres due to an SQL typo.

CHECK (filesize >= 0) should be CHECK (file_size >= 0)

here's the fixed code:

<?php
    case 'pgsql':
      db_query("
        CREATE TABLE {audio} (
            vid integer NOT NULL default '0'
                CHECK (vid >= 0),
            nid integer NOT NULL default '0'
                CHECK (nid >= 0),
            title_format varchar(128) default '',
            play_count integer NOT NULL default '0'
                CHECK (play_count >= 0),
            download_count integer NOT NULL default '0'
                CHECK (download_count >= 0),
            downloadable smallint NOT NULL default '1',
            file_format varchar(10) NOT NULL default '',
            file_mime varchar(255) NOT NULL default '',
            file_name varchar(255) NOT NULL default '',
            file_path varchar(255) NOT NULL default '',
            file_size integer NOT NULL default '0'
                CHECK (file_size >= 0),
            sample_rate integer NOT NULL default '0'
                CHECK (sample_rate >= 0),
            channel_mode varchar(10) NOT NULL default '',
            bitrate float NOT NULL default '0'
                CHECK (bitrate >= 0),
            bitrate_mode varchar(4) NOT NULL default '',
            playtime varchar(10) NOT NULL default '',
            PRIMARY KEY  (vid)
        );
      ");
?>

hth,

DT

CommentFileSizeAuthor
#2 audio_289760.patch827 bytesdrewish

Comments

drewish’s picture

Status: Active » Needs work

could you roll a patch?

drewish’s picture

Status: Needs work » Fixed
StatusFileSize
new827 bytes

committed the attached to DRUPAL-5--2.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.