diff options
author | Serge Skripchuk <s.skripchuk@internetdevels.com> | 2017-08-13 15:33:04 +0300 |
---|---|---|
committer | Serge Skripchuk <s.skripchuk@internetdevels.com> | 2017-08-13 15:33:04 +0300 |
commit | 3aac61cfa74c0ca6816ddebed7e955519c11b9e2 (patch) | |
tree | 73299c55aabf4f248a997a20968dd3f906e5e5a9 /phpBB/phpbb/db/extractor | |
parent | d9a5c8e9182e0dffdebf09f4db33bd76e9574765 (diff) | |
download | forums-3aac61cfa74c0ca6816ddebed7e955519c11b9e2.tar forums-3aac61cfa74c0ca6816ddebed7e955519c11b9e2.tar.gz forums-3aac61cfa74c0ca6816ddebed7e955519c11b9e2.tar.bz2 forums-3aac61cfa74c0ca6816ddebed7e955519c11b9e2.tar.xz forums-3aac61cfa74c0ca6816ddebed7e955519c11b9e2.zip |
[ticket/15319] Add IF EXISTS to Postgres DROP SEQUENCE query
Diffstat (limited to 'phpBB/phpbb/db/extractor')
-rw-r--r-- | phpBB/phpbb/db/extractor/postgres_extractor.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/phpbb/db/extractor/postgres_extractor.php b/phpBB/phpbb/db/extractor/postgres_extractor.php index a98e39621c..0219d2ac8d 100644 --- a/phpBB/phpbb/db/extractor/postgres_extractor.php +++ b/phpBB/phpbb/db/extractor/postgres_extractor.php @@ -85,7 +85,7 @@ class postgres_extractor extends base_extractor // We don't even care about storing the results. We already know the answer if we get rows back. if ($this->db->sql_fetchrow($result)) { - $sql_data .= "DROP SEQUENCE {$table_name}_seq;\n"; + $sql_data .= "DROP SEQUENCE IF EXISTS {$table_name}_seq;\n"; $sql_data .= "CREATE SEQUENCE {$table_name}_seq;\n"; } $this->db->sql_freeresult($result); |