<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Changelog · D1</title><link>https://developers.cloudflare.com/d1/changelog/</link><description>Updates to Cloudflare's D1 product.</description><language>en-us</language><atom:link href="https://developers.cloudflare.com/d1/changelog/index.xml" rel="self"/><lastBuildDate>Tuesday, Oct 3, 2023</lastBuildDate><item><title>Create up to 50,000 D1 databases</title><link>https://developers.cloudflare.com/d1/changelog/#create-up-to-50000-d1-databases</link><description>&lt;p>Developers using D1 on a Workers Paid plan can now create up to 50,000 databases as part of ongoing increases to D1’s limits.&lt;/p>
&lt;ul>
&lt;li>This further enables database-per-user use-cases and allows you to isolate data between customers.&lt;/li>
&lt;li>Total storage per account is now 50 GB.&lt;/li>
&lt;li>D1’s &lt;a href=https://developers.cloudflare.com/d1/platform/metrics-analytics/ class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">analytics and metrics&lt;/span>&lt;/a> provide per-database usage data.&lt;/li>
&lt;/ul>
&lt;p>If you need to create more than 50,000 databases or need more per-account storage, &lt;a href=https://developers.cloudflare.com/d1/platform/limits/ class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">reach out&lt;/span>&lt;/a> to the D1 team to discuss.&lt;/p></description><pubDate>Tuesday, Oct 3, 2023</pubDate></item><item><title>The D1 public beta is here</title><link>https://developers.cloudflare.com/d1/changelog/#the-d1-public-beta-is-here</link><description>&lt;p>D1 is now in public beta, and storage limits have been increased:&lt;/p>
&lt;ul>
&lt;li>Developers with a Workers Paid plan now have a 2 GB per-database limit (up from 500 MB) and can create 25 databases per account (up from 10). These limits will continue to increase automatically during the public beta.&lt;/li>
&lt;li>Developers with a Workers Free plan retain the 500 MB per-database limit and can create up to 10 databases per account.&lt;/li>
&lt;/ul>
&lt;p>Databases must be using D1’s &lt;a href=https://developers.cloudflare.com/d1/changelog/#new-default-storage-subsystem class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">new storage subsystem&lt;/span>&lt;/a> to benefit from the increased database limits.&lt;/p>
&lt;p>Read the &lt;a href="https://blog.cloudflare.com/d1-open-beta-is-here/" class="DocsMarkdown--link" target="_blank" rel="noopener">
&lt;span class="DocsMarkdown--link-content">announcement blog&lt;/span>&lt;span class="DocsMarkdown--link-external-icon" aria-hidden="true">
&lt;svg fill="none" stroke="currentColor" stroke-width="1.5" width="23px" height="12px" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 16 16" role="img" aria-labelledby="title-4744738674102027" xmlns="http://www.w3.org/2000/svg">
&lt;title id="title-4744738674102027">External link icon&lt;/title>
&lt;path d="M6.75,1.75h-5v12.5h12.5v-5m0,-4v-3.5h-3.5M8,8l5.5-5.5">&lt;/path>
&lt;/svg>
&lt;span is-visually-hidden>&lt;/span>
&lt;/span>&lt;/a> for more details about what is new in the beta and what is coming in the future for D1.&lt;/p></description><pubDate>Thursday, Sep 28, 2023</pubDate></item><item><title>Row count now returned per query</title><link>https://developers.cloudflare.com/d1/changelog/#row-count-now-returned-per-query</link><description>&lt;p>D1 now returns a count of &lt;code>rows_written&lt;/code> and &lt;code>rows_read&lt;/code> for every query executed, allowing you to assess the cost of query for both &lt;a href=https://developers.cloudflare.com/d1/platform/pricing/ class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">pricing&lt;/span>&lt;/a> and &lt;a href=https://developers.cloudflare.com/d1/learning/using-indexes/ class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">index optimization&lt;/span>&lt;/a> purposes.&lt;/p>
&lt;p>The &lt;code>meta&lt;/code> object returned in &lt;a href=https://developers.cloudflare.com/d1/platform/client-api/ class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">D1’s Client API&lt;/span>&lt;/a> contains a total count of the rows read (&lt;code>rows_read&lt;/code>) and rows written (&lt;code>rows_written&lt;/code>) by that query. For example, a query that performs a full table scan (for example, &lt;code>SELECT * FROM users&lt;/code>) from a table with 5000 rows would return a &lt;code>rows_read&lt;/code> value of &lt;code>5000&lt;/code>:&lt;/p>
&lt;div class="code-container">
&lt;unparsed-codeblock data-language="json" data-code="%22meta%22%3A+%7B%0A++%22duration%22%3A+0.20472300052642825%2C%0A++%22size_after%22%3A+45137920%2C%0A++%22rows_read%22%3A+5000%2C%0A++%22rows_written%22%3A+0%0A%7D">&lt;/unparsed-codeblock>
&lt;vue-component name="CodeCopy">&lt;/vue-component>
&lt;/div>&lt;p>Refer to &lt;a href=https://developers.cloudflare.com/d1/platform/pricing/ class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">D1 pricing documentation&lt;/span>&lt;/a> to understand how reads and writes are measured. D1 remains free to use during the alpha period.&lt;/p></description><pubDate>Saturday, Aug 19, 2023</pubDate></item><item><title>Bind D1 from the Cloudflare dashboard</title><link>https://developers.cloudflare.com/d1/changelog/#bind-d1-from-the-cloudflare-dashboard</link><description>&lt;p>You can now &lt;a href=https://developers.cloudflare.com/d1/get-started/#3-bind-your-worker-to-your-d1-database class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">bind a D1 database&lt;/span>&lt;/a> to your Workers directly in the &lt;a href="https://dash.cloudflare.com" class="DocsMarkdown--link" target="_blank" rel="noopener">
&lt;span class="DocsMarkdown--link-content">Cloudflare dashboard&lt;/span>&lt;span class="DocsMarkdown--link-external-icon" aria-hidden="true">
&lt;svg fill="none" stroke="currentColor" stroke-width="1.5" width="23px" height="12px" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 16 16" role="img" aria-labelledby="title-4744738674102027" xmlns="http://www.w3.org/2000/svg">
&lt;title id="title-4744738674102027">External link icon&lt;/title>
&lt;path d="M6.75,1.75h-5v12.5h12.5v-5m0,-4v-3.5h-3.5M8,8l5.5-5.5">&lt;/path>
&lt;/svg>
&lt;span is-visually-hidden>&lt;/span>
&lt;/span>&lt;/a>. To bind D1 from the Cloudflare dashboard, select your Worker project -> &lt;strong>Settings&lt;/strong> -> &lt;strong>Variables&lt;/strong> -> and select &lt;strong>D1 Database Bindings&lt;/strong>.&lt;/p>
&lt;p>Note: If you have previously deployed a Worker with a D1 database binding with a version of &lt;code>wrangler&lt;/code> prior to &lt;code>3.5.0&lt;/code>, you must upgrade to &lt;a href="https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%403.5.0" class="DocsMarkdown--link" target="_blank" rel="noopener">
&lt;span class="DocsMarkdown--link-content">&lt;code>wrangler v3.5.0&lt;/code>&lt;/span>&lt;span class="DocsMarkdown--link-external-icon" aria-hidden="true">
&lt;svg fill="none" stroke="currentColor" stroke-width="1.5" width="23px" height="12px" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 16 16" role="img" aria-labelledby="title-4744738674102027" xmlns="http://www.w3.org/2000/svg">
&lt;title id="title-4744738674102027">External link icon&lt;/title>
&lt;path d="M6.75,1.75h-5v12.5h12.5v-5m0,-4v-3.5h-3.5M8,8l5.5-5.5">&lt;/path>
&lt;/svg>
&lt;span is-visually-hidden>&lt;/span>
&lt;/span>&lt;/a> first before you can edit your D1 database bindings in the Cloudflare dashboard. New Workers projects do not have this limitation.&lt;/p>
&lt;p>Legacy D1 alpha users who had previously prefixed their database binding manually with &lt;code>__D1_BETA__&lt;/code> should remove this as part of this upgrade. Your Worker scripts should call your D1 database via &lt;code>env.BINDING_NAME&lt;/code> only. Refer to the latest &lt;a href=https://developers.cloudflare.com/d1/get-started/#3-bind-your-worker-to-your-d1-database class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">D1 getting started guide&lt;/span>&lt;/a> for best practices.&lt;/p>
&lt;p>We recommend all D1 alpha users begin using wrangler &lt;code>3.5.0&lt;/code> (or later) to benefit from improved TypeScript types and future D1 API improvements.&lt;/p></description><pubDate>Wednesday, Aug 9, 2023</pubDate></item><item><title>Per-database limit now 500 MB</title><link>https://developers.cloudflare.com/d1/changelog/#per-database-limit-now-500-mb</link><description>&lt;p>Databases using D1’s &lt;a href=https://developers.cloudflare.com/d1/changelog/#new-default-storage-subsystem class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">new storage subsystem&lt;/span>&lt;/a> can now grow to 500 MB each, up from the previous 100 MB limit. This applies to both existing and newly created databases.&lt;/p>
&lt;p>Refer to &lt;a href=https://developers.cloudflare.com/d1/platform/limits/ class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">Limits&lt;/span>&lt;/a> to learn about D1’s limits.&lt;/p></description><pubDate>Tuesday, Aug 1, 2023</pubDate></item><item><title>New default storage subsystem</title><link>https://developers.cloudflare.com/d1/changelog/#new-default-storage-subsystem</link><description>&lt;p>Databases created via the Cloudflare dashboard and Wrangler (as of &lt;code>v3.4.0&lt;/code>) now use D1’s new storage subsystem by default. The new backend can &lt;a href="https://blog.cloudflare.com/d1-turning-it-up-to-11/" class="DocsMarkdown--link" target="_blank" rel="noopener">
&lt;span class="DocsMarkdown--link-content">be 6 - 20x faster&lt;/span>&lt;span class="DocsMarkdown--link-external-icon" aria-hidden="true">
&lt;svg fill="none" stroke="currentColor" stroke-width="1.5" width="23px" height="12px" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 16 16" role="img" aria-labelledby="title-4744738674102027" xmlns="http://www.w3.org/2000/svg">
&lt;title id="title-4744738674102027">External link icon&lt;/title>
&lt;path d="M6.75,1.75h-5v12.5h12.5v-5m0,-4v-3.5h-3.5M8,8l5.5-5.5">&lt;/path>
&lt;/svg>
&lt;span is-visually-hidden>&lt;/span>
&lt;/span>&lt;/a> than D1’s original alpha backend.&lt;/p>
&lt;p>To understand which storage subsystem your database uses, run &lt;code>wrangler d1 info YOUR_DATABASE&lt;/code> and inspect the version field in the output.&lt;/p>
&lt;p>Databases with &lt;code>version: beta&lt;/code> use the new storage backend and support the &lt;a href=https://developers.cloudflare.com/d1/learning/time-travel/ class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">Time Travel&lt;/span>&lt;/a> API. Databases with &lt;code>version: alpha&lt;/code> only use D1’s older, legacy backend.&lt;/p></description><pubDate>Thursday, Jul 27, 2023</pubDate></item><item><title>Time Travel</title><link>https://developers.cloudflare.com/d1/changelog/#time-travel</link><description>&lt;p>&lt;a href=https://developers.cloudflare.com/d1/learning/time-travel/ class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">Time Travel&lt;/span>&lt;/a> is now available. Time Travel allows you to restore a D1 database back to any minute within the last 30 days (Workers Paid plan) or 7 days (Workers Free plan), at no additional cost for storage or restore operations.&lt;/p>
&lt;p>Refer to the &lt;a href=https://developers.cloudflare.com/d1/learning/time-travel/ class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">Time Travel&lt;/span>&lt;/a> documentation to learn how to travel backwards in time.&lt;/p>
&lt;p>Databases using D1’s &lt;a href="https://blog.cloudflare.com/d1-turning-it-up-to-11/" class="DocsMarkdown--link" target="_blank" rel="noopener">
&lt;span class="DocsMarkdown--link-content">new storage subsystem&lt;/span>&lt;span class="DocsMarkdown--link-external-icon" aria-hidden="true">
&lt;svg fill="none" stroke="currentColor" stroke-width="1.5" width="23px" height="12px" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 16 16" role="img" aria-labelledby="title-4744738674102027" xmlns="http://www.w3.org/2000/svg">
&lt;title id="title-4744738674102027">External link icon&lt;/title>
&lt;path d="M6.75,1.75h-5v12.5h12.5v-5m0,-4v-3.5h-3.5M8,8l5.5-5.5">&lt;/path>
&lt;/svg>
&lt;span is-visually-hidden>&lt;/span>
&lt;/span>&lt;/a> can use Time Travel. Time Travel replaces the &lt;a href=https://developers.cloudflare.com/d1/learning/backups/ class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">snapshot-based backups&lt;/span>&lt;/a> used for legacy alpha databases.&lt;/p></description><pubDate>Thursday, Jul 27, 2023</pubDate></item><item><title>Metrics and analytics</title><link>https://developers.cloudflare.com/d1/changelog/#metrics-and-analytics</link><description>&lt;p>You can now view &lt;a href=https://developers.cloudflare.com/d1/platform/metrics-analytics/ class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">per-database metrics&lt;/span>&lt;/a> via both the &lt;a href="https://dash.cloudflare.com/" class="DocsMarkdown--link" target="_blank" rel="noopener">
&lt;span class="DocsMarkdown--link-content">Cloudflare dashboard&lt;/span>&lt;span class="DocsMarkdown--link-external-icon" aria-hidden="true">
&lt;svg fill="none" stroke="currentColor" stroke-width="1.5" width="23px" height="12px" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 16 16" role="img" aria-labelledby="title-4744738674102027" xmlns="http://www.w3.org/2000/svg">
&lt;title id="title-4744738674102027">External link icon&lt;/title>
&lt;path d="M6.75,1.75h-5v12.5h12.5v-5m0,-4v-3.5h-3.5M8,8l5.5-5.5">&lt;/path>
&lt;/svg>
&lt;span is-visually-hidden>&lt;/span>
&lt;/span>&lt;/a> and the &lt;a href=https://developers.cloudflare.com/analytics/graphql-api/ class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">GraphQL Analytics API&lt;/span>&lt;/a>.&lt;/p>
&lt;p>D1 currently exposes read &amp; writes per second, query response size, and query latency percentiles.&lt;/p></description><pubDate>Wednesday, Jun 28, 2023</pubDate></item><item><title>Generated columns documentation</title><link>https://developers.cloudflare.com/d1/changelog/#generated-columns-documentation</link><description>New documentation has been published on how to use D1’s support for &lt;a href=https://developers.cloudflare.com/d1/learning/generated-columns/ class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">generated columns&lt;/span>&lt;/a> to define columns that are dynamically generated on write (or read). Generated columns allow you to extract data from &lt;a href=https://developers.cloudflare.com/d1/learning/querying-json/ class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">JSON objects&lt;/span>&lt;/a> or use the output of other SQL functions.</description><pubDate>Friday, Jun 16, 2023</pubDate></item><item><title>Deprecating Error.cause</title><link>https://developers.cloudflare.com/d1/changelog/#deprecating-error.cause</link><description>&lt;p>As of &lt;a href="https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%403.1.1" class="DocsMarkdown--link" target="_blank" rel="noopener">
&lt;span class="DocsMarkdown--link-content">&lt;code>wrangler v3.1.1&lt;/code>&lt;/span>&lt;span class="DocsMarkdown--link-external-icon" aria-hidden="true">
&lt;svg fill="none" stroke="currentColor" stroke-width="1.5" width="23px" height="12px" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 16 16" role="img" aria-labelledby="title-4744738674102027" xmlns="http://www.w3.org/2000/svg">
&lt;title id="title-4744738674102027">External link icon&lt;/title>
&lt;path d="M6.75,1.75h-5v12.5h12.5v-5m0,-4v-3.5h-3.5M8,8l5.5-5.5">&lt;/path>
&lt;/svg>
&lt;span is-visually-hidden>&lt;/span>
&lt;/span>&lt;/a> the &lt;a href=https://developers.cloudflare.com/d1/platform/client-api/ class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">D1 client API&lt;/span>&lt;/a> now returns &lt;a href=https://developers.cloudflare.com/d1/platform/client-api/#errors class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">detailed error messages&lt;/span>&lt;/a> within the top-level &lt;code>Error.message&lt;/code> property, and no longer requires developers to inspect the &lt;code>Error.cause.message&lt;/code> property.&lt;/p>
&lt;p>To facilitate a transition from the previous &lt;code>Error.cause&lt;/code> behaviour, detailed error messages will continue to be populated within &lt;code>Error.cause&lt;/code> as well as the top-level &lt;code>Error&lt;/code> object until approximately July 14th, 2023. Future versions of both &lt;code>wrangler&lt;/code> and the D1 client API will no longer populate &lt;code>Error.cause&lt;/code> after this date.&lt;/p></description><pubDate>Monday, Jun 12, 2023</pubDate></item><item><title>New experimental backend</title><link>https://developers.cloudflare.com/d1/changelog/#new-experimental-backend</link><description>&lt;p>D1 has a new experimental storage back end that dramatically improves query throughput, latency and reliability. The experimental back end will become the default back end in the near future. To create a database using the experimental backend, use &lt;code>wrangler&lt;/code> and set the &lt;code>--experimental-backend&lt;/code> flag when creating a database:&lt;/p>
&lt;div class="code-container">
&lt;unparsed-codeblock data-language="sh" data-code="%24+wrangler+d1+create+your-database+--experimental-backend">&lt;/unparsed-codeblock>
&lt;vue-component name="CodeCopy">&lt;/vue-component>
&lt;/div>&lt;p>Read more about the experimental back end in the &lt;a href="https://blog.cloudflare.com/d1-turning-it-up-to-11/" class="DocsMarkdown--link" target="_blank" rel="noopener">
&lt;span class="DocsMarkdown--link-content">announcement blog&lt;/span>&lt;span class="DocsMarkdown--link-external-icon" aria-hidden="true">
&lt;svg fill="none" stroke="currentColor" stroke-width="1.5" width="23px" height="12px" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 16 16" role="img" aria-labelledby="title-4744738674102027" xmlns="http://www.w3.org/2000/svg">
&lt;title id="title-4744738674102027">External link icon&lt;/title>
&lt;path d="M6.75,1.75h-5v12.5h12.5v-5m0,-4v-3.5h-3.5M8,8l5.5-5.5">&lt;/path>
&lt;/svg>
&lt;span is-visually-hidden>&lt;/span>
&lt;/span>&lt;/a>.&lt;/p></description><pubDate>Friday, May 19, 2023</pubDate></item><item><title>Location hints</title><link>https://developers.cloudflare.com/d1/changelog/#location-hints</link><description>You can now provide a &lt;a href=https://developers.cloudflare.com/d1/learning/data-location/ class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">location hint&lt;/span>&lt;/a> when creating a D1 database, which will influence where the leader (writer) is located. By default, D1 will automatically create your database in a location close to where you issued the request to create a database. In most cases this allows D1 to choose the optimal location for your database on your behalf.</description><pubDate>Friday, May 19, 2023</pubDate></item><item><title>Query JSON</title><link>https://developers.cloudflare.com/d1/changelog/#query-json</link><description>&lt;a href=https://developers.cloudflare.com/d1/learning/querying-json/ class="DocsMarkdown--link">&lt;span class="DocsMarkdown--link-content">New documentation&lt;/span>&lt;/a> has been published that covers D1’s extensive JSON function support. JSON functions allow you to parse, query and modify JSON directly from your SQL queries, reducing the number of round trips to your database, or data queried.</description><pubDate>Wednesday, May 17, 2023</pubDate></item></channel></rss>