Closed Danwhy closed 5 years ago
@Danwhy I'm going to take a look at this tonight. please remove "[WiP]" if you feel it's "mergeable". thanks! 👍
Following along ...
Create SQL user:
Install deps
Create Database:
Migrate:
So far, so fail:
👍
test add item to database (Append.AddressTest)
test/append/address_test.exs:5
** (UndefinedFunctionError) function Repo.insert/1 is undefined (module Repo is not available)
😞
Have to add:
alias Append.Repo
To the top of lib/append/append_only_log.ex
as per: https://github.com/dwyl/phoenix-ecto-append-only-log-example/pull/2/files#diff-ba1c4c1b3f67bc03f7691e3253abce7dR2
then tests will pass:
adding to code/instructions in README.md
😉
:exclamation: No coverage uploaded for pull request base (
master@165818e
). Click here to learn what that means. The diff coverage is56.75%
.
@@ Coverage Diff @@
## master #2 +/- ##
=========================================
Coverage ? 56.75%
=========================================
Files ? 11
Lines ? 37
Branches ? 0
=========================================
Hits ? 21
Misses ? 16
Partials ? 0
Impacted Files | Coverage Δ | |
---|---|---|
test/support/channel_case.ex | 0% <0%> (ø) |
|
lib/append_web.ex | 0% <0%> (ø) |
|
lib/append_web/views/error_helpers.ex | 0% <0%> (ø) |
|
lib/append/address.ex | 100% <100%> (ø) |
|
test/support/conn_case.ex | 100% <100%> (ø) |
|
lib/append_web/controllers/page_controller.ex | 100% <100%> (ø) |
|
lib/append_web/views/error_view.ex | 100% <100%> (ø) |
|
lib/append_web/endpoint.ex | 50% <50%> (ø) |
|
test/support/data_case.ex | 57.14% <57.14%> (ø) |
|
lib/append_web/router.ex | 66.66% <66.66%> (ø) |
|
... and 1 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 165818e...72394c2. Read the comment docs.
@Cleop thanks. 👍
Note: we still need to add the answers to the "intro questions": https://github.com/dwyl/phoenix-ecto-append-only-log-example/issues/1#issuecomment-424738578
I'm going to add those to a separate PR shortly. Merging this for now. 👍
Adds basic guide for creating a schema and a behaviour to facilitate an append only database, with code and tests.
There are still some improvements/advancements that could be made to the guide (see open questions in #1), but this should be a good starting point