From 29994e9613a262b720969d075454f7f009004134 Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 25 Nov 2019 00:24:45 +0000 Subject: [PATCH] postgres now recommends IDENTITY over SERIAL --- .github/workflows/tests.yml | 5 +++-- core/dbengine.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5545450b..4add0b5e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,10 +11,11 @@ jobs: matrix: php: ['7.3'] database: ['pgsql', 'mysql', 'sqlite'] - runs-on: ubuntu-latest + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - name: Checkout + uses: actions/checkout@v1 - name: Set up PHP uses: shivammathur/setup-php@master diff --git a/core/dbengine.php b/core/dbengine.php index d0a9e6cd..a4e6e248 100644 --- a/core/dbengine.php +++ b/core/dbengine.php @@ -96,7 +96,7 @@ class PostgreSQL extends DBEngine public function scoreql_to_sql(string $data): string { - $data = str_replace(SCORE::AIPK, "SERIAL PRIMARY KEY", $data); + $data = str_replace(SCORE::AIPK, "INTEGER NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY", $data); $data = str_replace(SCORE::INET, "INET", $data); $data = str_replace(SCORE::BOOL_Y, $this->BOOL_Y, $data); $data = str_replace(SCORE::BOOL_N, $this->BOOL_N, $data);