| Crates.io | onlivfe_cache_store |
| lib.rs | onlivfe_cache_store |
| version | 0.0.0-alpha.0 |
| created_at | 2023-03-04 01:58:47.166024+00 |
| updated_at | 2023-03-04 01:58:47.166024+00 |
| description | A database storage backed for onlivfe |
| homepage | https://onlivfe.com |
| repository | https://github.com/onlivfe/core |
| max_upload_size | |
| id | 800269 |
| size | 9,040 |
onlivfe_cache_storeThe database storage backend of onlivfe.
One ready made option for core's storage backend, utilizing an SQLite database using SQLx.
SQLx CLI (cargo install sqlx-cli --no-default-features --features sqlite) can be very useful when working on this.
Generally speaking, you first generate a new migration:
sqlx migrate add NAME_OF_MIGRATION
Then write the SQL changes, and then re-generate the schema by running the migrations:
# Drop DB, recreate it and run all migrations
sqlx database drop && sqlx database create && sqlx migrate run
# Save metadata
cargo sqlx prepare