Packages

drizzle-kit

0.31.11 · 21 Sep 2026MIT42.7M / weekRepositoryHomepagenpmAtom feed

Your version

0.20.0

9 Nov 2023Where it was published

0.31.11 is the newest release of 0.20.x.

In short

1 deprecated3 changed

  • Deprecated

    ❗ sql`query`.as<type>() is now sql<type>`query`(). Old syntax is still supported, but is deprecated and will be removed in one of the next releases.

Release note

  • 🎉 Implemented support for WITH clause (docs). Example usage:

    const sq = db
      .select()
      .from(users)
      .prepareWithSubquery('sq');
    
    const result = await db
      .with(sq)
      .select({
        id: sq.id,
        name: sq.name,
        total: sql<number>`count(${sq.id})::int`(),
      })
      .from(sq)
      .groupBy(sq.id, sq.name);
  • 🐛 Fixed various bugs with selecting/joining of subqueries.

  • ❗ Renamed .subquery('alias') to .as('alias').

  • Deprecated

    ❗ sql`query`.as<type>() is now sql<type>`query`(). Old syntax is still supported, but is deprecated and will be removed in one of the next releases.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.