..

Using Diese

Connect sql in Rocket

[dependencies]
diesel = { version = "1.4.8", features = ["sqlite"] }

[dependencies.rocket_sync_db_pools]
version = "0.1.0-rc.2"
features = ["diesel_sqlite_pool"]

use diesel cli

diesel setup --database-url=<your database name>.sqlite #create database
diesel migration generate <your migration name> # create a migration

diesel migration run --database-url=database.sqlite # apply migration
diesel migration redo # by down.sql redoing the migration