-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: only define test repo if sqlite3 is available (#67)
This keeps the compiler happy if we're in a project or environment in which the user has chosen not to opt in to sqlite3 usage.
- Loading branch information
1 parent
13f23d6
commit 83d90db
Showing
2 changed files
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
defmodule Snowflex.SQLiteTestRepo do | ||
use Ecto.Repo, | ||
otp_app: :snowflex, | ||
adapter: Ecto.Adapters.SQLite3 | ||
if Code.ensure_loaded?(Ecto.Adapters.SQLite3) do | ||
defmodule Snowflex.SQLiteTestRepo do | ||
use Ecto.Repo, | ||
otp_app: :snowflex, | ||
adapter: Ecto.Adapters.SQLite3 | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters