Skip to content

Commit

Permalink
initial postgres16 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Don Sizemore committed Sep 18, 2023
1 parent 4e1bc5b commit 5d36e65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<packaging.type>war</packaging.type>

<reload4j.version>1.2.18.4</reload4j.version>
<flyway.version>9.21.2</flyway.version>
<flyway.version>9.22.1</flyway.version>
<jhove.version>1.20.1</jhove.version>
<jacoco.version>0.8.7</jacoco.version>
<poi.version>5.2.1</poi.version>
Expand Down Expand Up @@ -790,7 +790,7 @@
<skipIntegrationTests>true</skipIntegrationTests>
<!-- Once we truly run tests with Testcontainers, this should be switch to "docker", activating ITs -->
<packaging.type>docker-build</packaging.type>
<postgresql.server.version>13</postgresql.server.version>
<postgresql.server.version>16</postgresql.server.version>

<app.image>gdcc/dataverse:${app.image.tag}</app.image>
<app.image.tag>unstable</app.image.tag>
Expand Down
6 changes: 5 additions & 1 deletion scripts/installer/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,13 @@
conn.close()

if int(pg_major_version) >= 15:
admin_conn_string = "dbname='"+pgDb+"' user='postgres' password='"+pgAdminPassword+"' host='"+pgHost+"'"
conn = psycopg2.connect(admin_conn_string)
conn.set_isolation_level(ISOLATION_LEVEL_AUTOCOMMIT)
cur = conn.cursor()
conn_cmd = "GRANT CREATE ON SCHEMA public TO "+pgUser+";"
print("PostgreSQL 15 or higher detected. Running " + conn_cmd)
try:
print("PostgreSQL 15 or higher detected. Running " + conn_cmd)
cur.execute(conn_cmd)
except:
if force:
Expand Down

0 comments on commit 5d36e65

Please sign in to comment.