You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Running SearchLight.Migrations.create_relationship_migration creates a file named
2022..._create_relationship_table_model1s_model2s.jl
This file contains the lines:
import SearchLight.Migrations: create_table, column, columns, pk, add_index, drop_table
function up()
create_table(:model1smodel2s) do
[
primary_key()
column(:model1s_id, :int)
column(:model2s_id, :int)
]
end
So it imports pk, but tries to use primary_key.
Error stacktrace
julia> SearchLight.Migrations.all_up!!()
[ Info: 2022-01-14 11:45:16 SELECT version FROM schema_migrations ORDER BY version DESC
[ Info: 2022-01-14 11:45:16 SELECT version FROM schema_migrations ORDER BY version DESC
┌ Error: 2022-01-14 11:45:16 Failed executing migration CreateRelationshipTableModel1sModel2s up
└ @ SearchLight.Migration ~/.julia/packages/SearchLight/B9d2o/src/Migration.jl:300
ERROR: UndefVarError: primary_key not defined
...
To reproduce
Should be fairly obvious...
Expected behavior
It imports and uses the same function (pk or primary_key), and the relationship table is created.
Additional context
julia> versioninfo()
Julia Version 1.6.2
Commit 1b93d53fc4 (2021-07-14 15:36 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i3-6100 CPU @ 3.70GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Environment:
JULIA_REVISE = auto
Hello, I think this will be a quick fix.
Describe the bug
Running SearchLight.Migrations.create_relationship_migration creates a file named
2022..._create_relationship_table_model1s_model2s.jl
This file contains the lines:
So it imports pk, but tries to use primary_key.
Error stacktrace
To reproduce
Should be fairly obvious...
Expected behavior
It imports and uses the same function (pk or primary_key), and the relationship table is created.
Additional context
The text was updated successfully, but these errors were encountered: