> For the complete documentation index, see [llms.txt](https://docs.riff.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.riff.ai/archive/guides-legacy/migrating-from-databutton.md).

# Migrating from Databutton

{% hint style="success" %}
Migrating an app from Databutton to Riff only takes a few minutes. Note that the task generated in your app during this process needs to be completed before your app will be functional again in Riff.
{% endhint %}

## How-to

1. Go to <https://riff.new/home> and locate your Databutton app. You can distinguish between Databutton and Riff apps by looking at the label on your app. Databutton apps are also marked with the Databutton logo.
2. Click the "Move to Riff" button to start the process. The process itself will take roughly 1-2 minutes, during which we do the following
   1. We analyze your app to detect any known issues that might need to be fixed before you can migrate. If the process fails, please consult the section further down on known issues.
   2. For some known issues that doesn't block the migration, your app will be populated with a set of follow-up tasks that **must be completed in Riff** to finalize the migration.
   3. Your workspace will be upgraded to the much faster Riff workspace with improved handling of secrets and support for native integrations and self-service package installation.
3. When the process is done, you will be sent into your workspace in Riff. Under the task tab you will see a task for completing the migration to Riff. This task usually includes:
   1. Rewriting deprecated code (optional)
   2. Installing necessary packages

<figure><img src="/files/J9ZhYFSox684B2u7KxtT" alt=""><figcaption></figcaption></figure>

## Discontinued features

### Sending emails with db.notify.email

The built-in feature in the Databutton SDK called `db.notify.email` is discontinued in Databutton. This must be replaced with a tool like <https://resend.com> to continue sending emails from your app. If your app is using `db.notify.email`, your app will be populated with a task for replacing this.

### Fetching secrets with db.secrets.get

The Databutton SDK feature for fetching secrets has been replaced by use of environment variables. This means that what earlier was `db.secrets.get("API_KEY")` is now `os.environ.get("API_KEY")`. If this is relevant for your app, your migrated app will include a task with instructions to the agent on how to fix this.

## Known issues blocking automatic migration

### App mixing database environments

**Problem**

In Databutton, the agent access secrets through the `db.secrets.get(<secret>)` , and in some cases the agent uses the same database URL in your workspace and in the deployed app. In Riff, this is scoped to the environment, meaning you cannot access the production database from the workspace and vice versa.

**Resolution**

If the migration process uncovers this mistake, the migration will be stopped and you need to resolve this issue before migrating your app.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.riff.ai/archive/guides-legacy/migrating-from-databutton.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
