Open8

Dieselの素振り

おふじおふじ

アプリケーションへ導入

featuresに利用したいDBエンジンに対応したfeatureを指定

[dependencies]
diesel = { version = "2.2.0", features = ["postgres"] }
おふじおふじ

Dieselクライアントのインストール

cargo install diesel_cli
おふじおふじ

またfeatureをpostgresに限定してinstall

cargo install diesel_cli --no-default-features --features postgres
おふじおふじ

migration fileの作成

diesel migration generate {migration file name}