From 52fb83d19672979eededacb5c6f5278965f24916 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Sun, 20 Oct 2024 10:48:21 +0200 Subject: [PATCH] Adjust SQL DDL for sqlalchemy-cratedb 0.40.0 --- CHANGES.rst | 1 + tests/format/test_netcdf.py | 2 +- tests/util.py | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 3d4d8d2..991556c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,6 +6,7 @@ Skeem changelog in progress =========== - Added support for Python 3.12 +- Adjusted SQL DDL for sqlalchemy-cratedb 0.40.0 2023-03-09 0.1.0 diff --git a/tests/format/test_netcdf.py b/tests/format/test_netcdf.py index 3c06459..ce896fb 100644 --- a/tests/format/test_netcdf.py +++ b/tests/format/test_netcdf.py @@ -10,7 +10,7 @@ reference = unwrap( """ CREATE TABLE "aircraft_track_lear" ( - "time" TIMESTAMP NOT NULL, + "time" TIMESTAMP WITHOUT TIME ZONE NOT NULL, "altitude" DOUBLE NOT NULL, "latitude" DOUBLE NOT NULL, "longitude" DOUBLE NOT NULL, diff --git a/tests/util.py b/tests/util.py index e02559c..87d389a 100644 --- a/tests/util.py +++ b/tests/util.py @@ -32,7 +32,7 @@ def get_basic_sql_reference( CREATE TABLE "{clean_key_name(table_name)}" ( "id" INT NOT NULL, "name" STRING NOT NULL, - "date" TIMESTAMP{" NOT NULL" if timestamp_not_null else ""}, + "date" TIMESTAMP WITHOUT TIME ZONE{" NOT NULL" if timestamp_not_null else ""}, "fruits" STRING NOT NULL, "price" DOUBLE NOT NULL, PRIMARY KEY ("{primary_key}") @@ -43,7 +43,8 @@ def get_basic_sql_reference( CREATE TABLE {clean_key_name(table_name)} ( id INT NOT NULL, name STRING, - date {"TIMESTAMP" if not timestamp_is_string else "STRING"}{" NOT NULL" if timestamp_not_null else ""}, + date {"TIMESTAMP WITHOUT TIME ZONE" if not timestamp_is_string else "STRING" + }{" NOT NULL" if timestamp_not_null else ""}, fruits STRING, price FLOAT, PRIMARY KEY ({primary_key})