Skip to content

Commit

Permalink
Adjust SQL DDL for sqlalchemy-cratedb 0.40.0
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Oct 20, 2024
1 parent bf3c6bf commit 52fb83d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/format/test_netcdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions tests/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand All @@ -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})
Expand Down

0 comments on commit 52fb83d

Please sign in to comment.