Luis Serota
Luis Serota
DTDrizzle Team
Created by stumpykilo on 5/3/2024 in #help
New enum values must be committed before they can be used
I just ran into the same issue! very odd, but used the same fix to get through it. feels a bit flaky though
3 replies
DTDrizzle Team
Created by Anas Badran on 8/23/2024 in #help
Storing Images
I'm getting this error as well! same syntax and with postgres. To get by it, im just diong doing () => new Date() which seems to work, though would prefer to let the DB do the work with SQL
14 replies
DTDrizzle Team
Created by jsingleton37 on 6/10/2024 in #help
onConflictDoNothing still incrementing primaryKey
@Raphaël M (@rphlmr) ⚡ totally! but then how else would you recommend doing this without burning serial ids when there are conflicts?
9 replies
DTDrizzle Team
Created by jsingleton37 on 6/10/2024 in #help
onConflictDoNothing still incrementing primaryKey
@Raphaël M (@rphlmr) ⚡ Main use case here is that we're bulk upserting lots of records via an ETL, and some of those records may be old and being flushed through again unnecessarily, so we would want all upserting to be idempotent without burning serial ids in those cases where we're getting the same data repetitively. sounds like insert...OnConflictDoUpdate then isn't the way to go since the serial id gets incremented right as the isnert is called even if it doesn't success and ends up performing an update! I'm coming from Django world where they've got update_or_create built-ins that I imagine do the separate queries in series (check for existing ones and then insert or udpate) under the hood, which I know is know the aim of Drizzle to provide!
9 replies
DTDrizzle Team
Created by jsingleton37 on 6/10/2024 in #help
onConflictDoNothing still incrementing primaryKey
Ah! Very helpful, thank you both. Are there any common workarounds to prevent the serial id from incrementing in this case? Is the best workaround to write two separate queries (one to queue up existing records) and then check against the result before insert/update? Feels a bit DB-expensive to do it that way, but I would guess that's how other ORMs (Django mostly in my experience) implements that under the hood>
9 replies
DTDrizzle Team
Created by jsingleton37 on 6/10/2024 in #help
onConflictDoNothing still incrementing primaryKey
Hi @jsingleton37 ! I'm having a similar issue as well. Did you ever get to a solution here?
9 replies