Skip to content

Commit

Permalink
Merge branch 'r/0.4.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
emirror-de committed Nov 22, 2021
2 parents 948731e + c1d8fa6 commit 4d9a6c4
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 24 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## v0.4.1

### New features

* None

### Changes

* Updated `barrel` dependency to `0.7.0`
* Bugfix, the `barrel` implementation was specifically implemented for the example
* Removed the requirement of `log` crate as dependency when using this library

### Removals and deprecations

None

## v0.4.0

### New features
Expand Down
2 changes: 1 addition & 1 deletion naphtha-proc-macro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "naphtha-proc-macro"
version = "0.4.0"
version = "0.4.1"
authors = ["Lewin Probst <[email protected]>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions naphtha/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "naphtha"
version = "0.4.0"
version = "0.4.1"
authors = ["Lewin Probst <[email protected]>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand All @@ -25,5 +25,5 @@ barrel-mysql = ["barrel_dep/mysql", "naphtha-proc-macro/barrel-mysql"]
barrel_dep = { version = "^0.7.0", optional = true, package = "barrel" }
chrono = { version = "^0.4.19" }
diesel = { version = "^1.4.8", features = ["chrono"] }
naphtha-proc-macro = { path = "../naphtha-proc-macro", version = "^0.4.0" }
naphtha-proc-macro = { path = "../naphtha-proc-macro", version = "^0.4.1" }
log = "^0.4.14"
3 changes: 2 additions & 1 deletion naphtha/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# naphtha

This crate is currently in progress. Visit the [documentation](https://docs.rs/naphtha) page for more information.
This crate is currently in progress. Visit the [docs.rs documentation](https://docs.rs/naphtha) page for more information.

44 changes: 24 additions & 20 deletions naphtha/examples/person.rs
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
// You can run this example on different databases (Docker files provided in
// the repository root).
// Select the database by compiling this example with the corresponding feature:
// * sqlite
// * mysql
// * sqlite and barrel-sqlite
// * mysql and barrel-mysql
// Also make sure that the correct type DbBackend is uncommented, see below.
// Default is SqliteConnection.

#[macro_use]
extern crate diesel;

use chrono::prelude::NaiveDateTime;
use naphtha::{
barrel::{
types,
DatabaseSqlMigration,
DatabaseSqlMigrationExecutor,
Migration,
use {
chrono::prelude::NaiveDateTime,
naphtha::{
barrel::{
types,
DatabaseSqlMigration,
DatabaseSqlMigrationExecutor,
Migration,
},
diesel::prelude::*,
model,
DatabaseConnect,
DatabaseConnection,
DatabaseInsertHandler,
DatabaseModel,
DatabaseModelModifier,
DatabaseRemoveHandler,
DatabaseUpdateHandler,
},
model,
DatabaseConnect,
DatabaseConnection,
DatabaseInsertHandler,
DatabaseModel,
DatabaseModelModifier,
DatabaseRemoveHandler,
DatabaseUpdateHandler,
};

const DATABASE_URL: &'static str = if cfg!(feature = "sqlite") {
Expand All @@ -34,9 +38,9 @@ const DATABASE_URL: &'static str = if cfg!(feature = "sqlite") {
"not supported"
};

//
//type DbBackend = diesel::SqliteConnection;
type DbBackend = diesel::MysqlConnection;
// UNCOMMENT THE BACKEND THAT YOU WANT TO USE
type DbBackend = diesel::SqliteConnection;
//type DbBackend = diesel::MysqlConnection;

// The model attribute automatically adds:
//
Expand Down

0 comments on commit 4d9a6c4

Please sign in to comment.