Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/src/persistence/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ This will create a new folder with an up.sql and down.sql.

## Step 3: Run the migration + generate the schema
```
cd <warp-internal repo>
cd <repo root>
diesel migration run --database-url="/Users/$USER/Library/Application Support/dev.warp.Warp-Local/warp.sqlite"
```
This will run the migration on the same warp that runs when you run the app locally. This automatically generates or updates the `app/src/persistence/schema.rs`. We do not make manual edits to `schema.rs`.
This will run the migration on the same warp that runs when you run the app locally. This automatically generates or updates the `crates/persistence/src/schema.rs`. We do not make manual edits to `schema.rs`.

You can also print the schema from a database that already has the migration with:
```
Expand All @@ -49,7 +49,7 @@ diesel migration redo --database-url="/Users/$USER/Library/Application Support/d
- If there's a table `foos` and a table `bars`, and `bars` has a column with a foreign key that references `foos.id`, name it `foo_id`.

# The `schema.patch` file
The `app/src/persistence/schema.patch` is manually updated by us. This file lets us make manual
The `crates/persistence/schema.patch` is manually updated by us. This file lets us make manual
changes on top of the auto-generated `schema.rs` file produced by `diesel_cli`.

To create the `schema.patch` file, we:
Expand Down