# Database

### Cleaning Up The Database

On running the `npm run setup` command, your DB gets seeded with pre-defined tables for users, pricing, subscriptions, etc.

***

> **WARNING: Do not execute these commands if you’re unsure about what you want to do.**

If you have used OneMix locally and have a lot of dummy data in the DB that you want to get rid of, you can use `npx prisma db push --force-reset`

***

> **WARNING: Do not execute these commands if you’re unsure about what you want to do.**

In case you want to make a few adjustments in the DB structure and you’re okay with losing any existing dummy data, you can make the changes in `prisma/schema.prisma` file and then run the `npx prisma migrate reset` command.

This command will:

* Drop the database
* Create a new database
* Apply all migrations
* Generate the Prisma client

> **TIP: You might get `resource_already_exists` error from Stripe on running this command if you haven’t made changes to the products in `scripts/config.ts` file. You can ignore this.**


---

# Agent Instructions: 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:

```
GET https://onemix-docs.saask.ing/features/database.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
