Skip to content

Commit

Permalink
#6057 Postgres migration should support all postgres versions
Browse files Browse the repository at this point in the history
  • Loading branch information
NateWr committed Nov 12, 2020
1 parent fbfd970 commit 7d181bb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ private function _migrateSubmissionFiles() {

// Postgres leaves the old file_id autoincrement sequence around, so
// we delete it and apply a new sequence.
if (Config::getVar('database', 'driver') === 'postgres9') {
if (substr(Config::getVar('database', 'driver'), 0, strlen('postgres')) === 'postgres') {
Capsule::statement('DROP SEQUENCE submission_files_file_id_seq CASCADE');
Capsule::schema()->table('submission_files', function (Blueprint $table) {
$table->bigIncrements('submission_file_id')->change();
Expand Down

0 comments on commit 7d181bb

Please sign in to comment.