https://github.com/tdwesten/tauri-drizzle-sqlite-proxy-demo
A Tauri app with a React front-end and a SQLite database using Drizzle ORM
https://github.com/tdwesten/tauri-drizzle-sqlite-proxy-demo
drizzle-orm sql tauri-app
Last synced: 5 months ago
JSON representation
A Tauri app with a React front-end and a SQLite database using Drizzle ORM
- Host: GitHub
- URL: https://github.com/tdwesten/tauri-drizzle-sqlite-proxy-demo
- Owner: tdwesten
- Created: 2024-03-02T18:30:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-30T18:09:14.000Z (over 2 years ago)
- Last Synced: 2024-03-30T19:24:55.842Z (over 2 years ago)
- Topics: drizzle-orm, sql, tauri-app
- Language: TypeScript
- Homepage:
- Size: 271 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tauri + Drizzl ORM + SQLite
This is a simple example of how to use Tauri with Drizzl ORM and SQLite.
## Getting Started
Run the following commands to start the application:
```bash
npm install
```
```bash
npm run tauri dev
```
## Migration
After updating your models, you can run the following command to generate a new migration file in the `src-tauri/migrations` folder:
```bash
npm run migrate
```
By adding this to the tauri.config.js file the migrations folder in the app resoureces will be exposed to the tauri app.
```javascript
"resources": [
"migrations/*"
]
```
## Database
You can find the sqlite database file in the `~/Library/Application Support/com.tauri.dev` folder or the equivalent for your OS. See the [Tauri documentation](https://tauri.app/v1/api/js/path/#appdir) for more information.