We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent daf21f1 commit eee04dbCopy full SHA for eee04db
tests/table/test_insert.py
@@ -232,14 +232,18 @@ def test_target_string(self):
232
"""
233
Band = self.Band
234
235
- constraint_name = Band.raw(
236
- """
+ constraint_name = [
+ i["constraint_name"]
237
+ for i in Band.raw(
238
+ """
239
SELECT constraint_name
240
FROM information_schema.constraint_column_usage
241
WHERE column_name = 'name'
242
AND table_name = 'band';
243
- ).run_sync()[0]["constraint_name"]
244
+ ).run_sync()
245
+ if i["constraint_name"].endswith("_key")
246
+ ][0]
247
248
query = Band.insert(Band(name=self.band.name)).on_conflict(
249
target=constraint_name,
0 commit comments