# push (/docs/cli/db/push)

Location: CLI > db > push

The `prisma db push` command pushes the state of your Prisma schema to the database without using migrations. It creates the database if it does not exist.

This command is a good choice when you don't need to version schema changes, such as during prototyping and local development.

Usage [#usage]

```bash
prisma db push [options]
```

The datasource URL configuration is read from the Prisma config file (e.g., `prisma.config.ts`).

Prerequisites [#prerequisites]

Configure your database connection in `prisma.config.ts`:

```prisma file=schema.prisma
generator client {
  provider = "prisma-client"
  output   = "../generated/prisma"
}

datasource db {
  provider = "sqlite"
}
```

```typescript file=prisma.config.ts
import { defineConfig, env } from "prisma/config";

export default defineConfig({
  schema: "prisma/schema.prisma",
  migrations: {
    path: "prisma/migrations",
  },
  datasource: {
    url: env("DATABASE_URL"),
  },
});
```

Options [#options]

| Option               | Description                                             |
| -------------------- | ------------------------------------------------------- |
| `-h`, `--help`       | Display help message                                    |
| `--config`           | Custom path to your Prisma config file                  |
| `--schema`           | Custom path to your Prisma schema                       |
| `--url`              | Override the datasource URL from the Prisma config file |
| `--accept-data-loss` | Ignore data loss warnings                               |
| `--force-reset`      | Force a reset of the database before push               |

> [!WARNING]
> In Prisma v7, `db push` no longer runs `prisma generate` automatically. Run it explicitly if needed.

Examples [#examples]

Push the schema to the database [#push-the-schema-to-the-database]

  

#### npm

```bash
npx prisma db push
```

#### pnpm

```bash
pnpm dlx prisma db push
```

#### yarn

```bash
yarn dlx prisma db push
```

#### bun

```bash
bunx --bun prisma db push
```

Accept data loss [#accept-data-loss]

Proceed even if the changes might result in data loss:

  

#### npm

```bash
npx prisma db push --accept-data-loss
```

#### pnpm

```bash
pnpm dlx prisma db push --accept-data-loss
```

#### yarn

```bash
yarn dlx prisma db push --accept-data-loss
```

#### bun

```bash
bunx --bun prisma db push --accept-data-loss
```

Specify a schema path [#specify-a-schema-path]

  

#### npm

```bash
npx prisma db push --schema=/tmp/schema.prisma
```

#### pnpm

```bash
pnpm dlx prisma db push --schema=/tmp/schema.prisma
```

#### yarn

```bash
yarn dlx prisma db push --schema=/tmp/schema.prisma
```

#### bun

```bash
bunx --bun prisma db push --schema=/tmp/schema.prisma
```

Force reset before push [#force-reset-before-push]

Reset the database before applying changes:

  

#### npm

```bash
npx prisma db push --force-reset
```

#### pnpm

```bash
pnpm dlx prisma db push --force-reset
```

#### yarn

```bash
yarn dlx prisma db push --force-reset
```

#### bun

```bash
bunx --bun prisma db push --force-reset
```

See also [#see-also]

* [Conceptual overview of `db push` and when to use it over Prisma Migrate](/orm/prisma-migrate/workflows/prototyping-your-schema)
* [Schema prototyping with `db push`](/orm/prisma-migrate/workflows/prototyping-your-schema)

## Related pages

- [`execute`](https://www.prisma.io/docs/cli/db/execute): Execute native commands to your database
- [`pull`](https://www.prisma.io/docs/cli/db/pull): Pull the state from the database to the Prisma schema using introspection
- [`seed`](https://www.prisma.io/docs/cli/db/seed): Seed your database with test or initial data using custom scripts