Skip to content

Commit 537ee56

Browse files
committed
changes
1 parent 8d8b2c8 commit 537ee56

File tree

5 files changed

+7
-20
lines changed

5 files changed

+7
-20
lines changed

.github/workflows/test_all_versions.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: actions/checkout@v4
3333
with:
3434
repository: singlestore-labs/django
35-
ref: singlestore-test-4.2.x
35+
ref: singlestore-test-5.0.x
3636
path: testrepo
3737
- name: Generate matrix JSON
3838
id: set-matrix
@@ -90,13 +90,13 @@ jobs:
9090
uses: actions/checkout@v4
9191
with:
9292
repository: singlestore-labs/django
93-
ref: singlestore-test-4.2.x
93+
ref: singlestore-test-5.0.x
9494
path: testrepo
9595

9696
- name: Set up Python
9797
uses: actions/setup-python@v4
9898
with:
99-
python-version: "3.10"
99+
python-version: "3.11"
100100
cache: pip
101101

102102
- name: Install test suite and package

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
- name: Set up Python
7676
uses: actions/setup-python@v4
7777
with:
78-
python-version: "3.10"
78+
python-version: "3.11"
7979
cache: pip
8080

8181
- name: Install test suite and package

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ def handle_m2m_field(self, obj, field):
148148
- `dumpdata` django command does not work if a table or a referenced m2m table does not have `id` column, which is the case for m2m tables created as suggested above (see `queries_paragraph_page` table definition).
149149
- Fetching an instance of a custom through model using .objects.get() is not supported.
150150
- Case-insensitive filter requires casting the filtered column to a `TextField` with case-insensitive collation, e.g. `utf8mb4_general_ci`.
151+
- These complex expressions in `DEFAULT` clauses are not supported. SingleStore typically supports simple literal defaults (strings, numbers) and specific time functions like NOW() or CURRENT_TIMESTAMP() for datetime columns.
151152
152153
There may be more limitations (and fixes) as the test suite that comes with django is still being processed.
153154

django_singlestore/features.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ def django_test_skips(self):
752752
"test_extract_func_with_timezone", # noqa: E131
753753
"datetimes.tests.DateTimesTests.test_21432",
754754
},
755-
"SingleStore doest not support the SHA224 hashing algorithm":
755+
"SingleStore does not support the SHA224 hashing algorithm":
756756
{
757757
"db_functions.text.test_sha224.SHA224Tests.test_transform",
758758
"db_functions.text.test_sha224.SHA224Tests.test_basic",

django_singlestore/schema.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -112,21 +112,7 @@ def column_sql(self, model, field, include_default=False):
112112
default_sql, default_params = self.db_default_sql(field)
113113
result_sql_parts.append("DEFAULT " + default_sql)
114114
params.extend(default_params)
115-
# if hasattr(field.db_default, 'resolve_expression'):
116-
# # It's a database function (like Now())
117-
# compiler = self.connection.ops.compiler('SQLCompiler')(
118-
# query=None, connection=self.connection, using=None
119-
# )
120-
# db_default_sql = field.db_default.as_sql(compiler, self.connection)[0]
121-
# result_sql_parts.append("DEFAULT " + db_default_sql)
122-
# else:
123-
# # It's a literal value
124-
# db_default_sql = self._column_default_sql(field)
125-
# if self.connection.features.requires_literal_defaults:
126-
# result_sql_parts.append("DEFAULT " + db_default_sql % self.prepare_default(field.db_default))
127-
# else:
128-
# result_sql_parts.append("DEFAULT " + db_default_sql)
129-
# params.append(field.db_default)
115+
130116
# Include a regular default value, if requested and no db_default is set.
131117
elif include_default and not field.null:
132118
default_value = self.effective_default(field)

0 commit comments

Comments
 (0)