[root@localhost modules]# svn diff textimage/textimage.install Index: textimage/textimage.install =================================================================== --- textimage/textimage.install (revision 635) +++ textimage/textimage.install (working copy) @@ -16,12 +16,12 @@ case 'pgsql': db_query('CREATE TABLE {textimage_preset} ( - pid INTEGER NOT NULL CHECK (presetid > 0), + pid INT NOT NULL CHECK (pid > 0), name VARCHAR(255) NOT NULL DEFAULT \'\', settings TEXT NOT NULL DEFAULT \'\' - PRIMARY KEY (presetid));' + PRIMARY KEY (pid));' ); - db_query("CREATE SEQUENCE textimage_preset_presetid_seq INCREMENT 1 START 1;"); + db_query("CREATE SEQUENCE {textimage_preset}_pid_seq INCREMENT 1 START 1;"); break; } } @@ -29,7 +29,14 @@ function textimage_uninstall() { include_once(drupal_get_path('module', 'textimage') .'/textimage.module'); - db_query('DROP TABLE {textimage_preset}'); + db_query('DROP TABLE {textimage_preset}'); + + switch ($GLOBALS['db_type']) { + case 'pgsql': + db_query('DROP SEQUENCE {textimage_preset}_pid_seq;'); + break; + } + $path = realpath(file_directory_path() .'/textimage'); if($path != FALSE) _textimage_recursive_delete($path); @@ -67,12 +74,12 @@ case 'pgsql': $ret[] = update_sql('CREATE TABLE {textimage_preset} ( - pid INTEGER NOT NULL CHECK (presetid > 0), + pid INT NOT NULL CHECK (pid > 0), name VARCHAR(255) NOT NULL DEFAULT \'\', settings TEXT NOT NULL DEFAULT \'\' - PRIMARY KEY (presetid));' + PRIMARY KEY (pid));' ); - $ret[] = update_sql("CREATE SEQUENCE textimage_preset_presetid_seq INCREMENT 1 START 1;"); + $ret[] = update_sql("CREATE SEQUENCE {textimage_preset}_pid_seq INCREMENT 1 START 1;"); break; } @@ -99,4 +106,4 @@ variable_del('textimage_image_margin'); return $ret; -} \ No newline at end of file +}