Skip to content

Commit f0906cd

Browse files
committed
fix: add in more left out files
1 parent 76e9aa6 commit f0906cd

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ test_snapshots_path
2828
test/test.db
2929
test/test.db-shm
3030
test/test.db-wal
31+
test/dev_test.db
32+
test/dev_test.db-shm
33+
test/dev_test.db-wal

lib/migration_generator/migration_generator.ex

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -876,14 +876,13 @@ defmodule AshSqlite.MigrationGenerator do
876876
end
877877

878878
defp require_name!(opts) do
879-
if !opts.name && !opts.dry_run && !opts.check && !opts.snapshots_only && !opts.dev &&
880-
!opts.auto_name do
879+
if !opts.name && !opts.dry_run && !opts.check && !opts.dev && !opts.auto_name do
881880
raise """
882881
Name must be provided when generating migrations, unless `--dry-run` or `--check` or `--dev` is also provided.
883882
884883
Please provide a name. for example:
885884
886-
mix ash_postgres.generate_migrations <name> ...args
885+
mix ash_sqlite.generate_migrations <name> ...args
887886
"""
888887
end
889888

test/support/dev_test_repo.ex

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
defmodule AshSqlite.DevTestRepo do
2+
@moduledoc false
3+
use AshSqlite.Repo,
4+
otp_app: :ash_sqlite
5+
6+
def on_transaction_begin(data) do
7+
send(self(), data)
8+
end
9+
10+
def prefer_transaction?, do: false
11+
12+
def prefer_transaction_for_atomic_updates?, do: false
13+
end

test/test_helper.exs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ ExUnit.start()
22
ExUnit.configure(stacktrace_depth: 100)
33

44
AshSqlite.TestRepo.start_link()
5+
AshSqlite.DevTestRepo.start_link()
56

67
Ecto.Adapters.SQL.Sandbox.mode(AshSqlite.TestRepo, :manual)
78
Ecto.Adapters.SQL.Sandbox.mode(AshSqlite.DevTestRepo, :manual)

0 commit comments

Comments
 (0)