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 281ce2a commit d7f4950
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 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
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 d7f4950

Please sign in to comment.