mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge pull request #6493 from rxu/ticket/17148
[ticket/17148] Fix sql_table_exists() error for PostgreSQL 9.3 and earlier - 3.3.x
This commit is contained in:
commit
5ee2efd4c2
2 changed files with 4 additions and 2 deletions
4
.github/workflows/tests.yml
vendored
4
.github/workflows/tests.yml
vendored
|
@ -233,6 +233,8 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- php: '7.1'
|
||||||
|
db: "postgres:9.3"
|
||||||
- php: '7.1'
|
- php: '7.1'
|
||||||
db: "postgres:9.5"
|
db: "postgres:9.5"
|
||||||
- php: '7.1'
|
- php: '7.1'
|
||||||
|
@ -264,7 +266,7 @@ jobs:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: ${{ matrix.db != 'postgres:9.5' && matrix.db != 'postgres:9.6' && matrix.db != 'postgres:10' && matrix.db != 'postgres:11' && matrix.db != 'postgres:12' && matrix.db != 'postgres:13' && 'postgres:10' || matrix.db }}
|
image: ${{ matrix.db != 'postgres:9.3' && matrix.db != 'postgres:9.5' && matrix.db != 'postgres:9.6' && matrix.db != 'postgres:10' && matrix.db != 'postgres:11' && matrix.db != 'postgres:12' && matrix.db != 'postgres:13' && 'postgres:10' || matrix.db }}
|
||||||
env:
|
env:
|
||||||
POSTGRES_HOST: localhost
|
POSTGRES_HOST: localhost
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
|
|
|
@ -102,7 +102,7 @@ class postgres extends tools
|
||||||
function sql_table_exists($table_name)
|
function sql_table_exists($table_name)
|
||||||
{
|
{
|
||||||
$sql = "SELECT CAST(EXISTS(
|
$sql = "SELECT CAST(EXISTS(
|
||||||
SELECT FROM information_schema.tables
|
SELECT * FROM information_schema.tables
|
||||||
WHERE table_schema = 'public'
|
WHERE table_schema = 'public'
|
||||||
AND table_name = '" . $this->db->sql_escape($table_name) . "'
|
AND table_name = '" . $this->db->sql_escape($table_name) . "'
|
||||||
) AS INTEGER)";
|
) AS INTEGER)";
|
||||||
|
|
Loading…
Add table
Reference in a new issue