onlivfe_db_store

Crates.ioonlivfe_db_store
lib.rsonlivfe_db_store
version0.0.0-alpha.0
sourcesrc
created_at2023-03-04 01:58:38.291175
updated_at2023-03-04 01:58:38.291175
descriptionA database storage backed for onlivfe
homepagehttps://onlivfe.com
repositoryhttps://github.com/onlivfe/core
max_upload_size
id800268
size6,648
LJ (ljoonal)

documentation

https://docs.rs/onlivfe_db_store

README

onlivfe_db_store

The 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.

Database changes

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
Commit count: 37

cargo fmt