(slug: string)
| 39 | // slugs without round-tripping after every insert. |
| 40 | const planned = new Set<string>(); |
| 41 | const isTaken = async (slug: string) => { |
| 42 | if (planned.has(slug)) return true; |
| 43 | const hits = await sql`SELECT 1 FROM organizations WHERE slug = ${slug}`; |
| 44 | return hits.length > 0; |
| 45 | }; |
| 46 | |
| 47 | let updated = 0; |
| 48 | for (const row of rows) { |