drizzle-team / drizzle-team/drizzle-orm

[BUG]: Table already exists error during migrations when migrations are run the first time

Open
#3,821 9 comments 4 reactions 0 assignees View on GitHub
bug driver/op-sqlite priority
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Report hasn't been filed before.

- [X] I have verified that the bug I'm about to report hasn't been filed before.

### What version of `drizzle-orm` are you using?

0.36.4

### What version of `drizzle-kit` are you using?

0.27.2

### Other packages

_No response_

### Describe the Bug

#### Environment

- Runtime: Hermes (React Native)
- Driver: OP SQLite

#### Steps to reproduce

##### Setup

1. Create a React Native app with OP SQLite that applies a database migration (contents of migration is not significant).

##### Reproduction

1. Start the app, ensuring there is no existing database (the app has been freshly installed or the app data has been cleared).

#### Expected behaviour

Migrations are applied successfully.

#### Actual behaviour

Migrations error with message saying the first table that appears in the migration already exists.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.