GenieFramework / SearchLight.jl

ORM layer for Genie.jl, the highly productive Julia web framework
https://genieframework.com
MIT License
139 stars 16 forks source link

Method Error on SearchLight.Migration.last_up() #34

Closed dvetsch75 closed 3 years ago

dvetsch75 commented 3 years ago

I am going through the tutorial in the docs (which is great btw) and can't seem to figure out this part .

After running SearchLight.Generator.newmigration I get the migrations file just fine - it looks like so:

module AddCoverColumn
import SearchLight.Migrations: add_column, add_index

function up()
    add_column(:books, :cover, :string)
end

function down()
     # I am using SQLite
end

end

However, when I run either SearchLight.Migration.last_up() or SearchLight.Migration.status(), I get the following:

ERROR: MethodError: no method matching query(::String; internal=true)
Stacktrace:
 [1] upped_migrations() at C:\Users\dvets\.julia\packages\SearchLight\0MG55\src\Migration.jl:295 
 [2] run_migration(::SearchLight.Migration.DatabaseMigration, ::Symbol; force::Bool) at C:\Users\dvets\.julia\packages\SearchLight\0MG55\src\Migration.jl:237
 [3] #last_up#7 at C:\Users\dvets\.julia\packages\SearchLight\0MG55\src\Migration.jl:118 [inlined]
 [4] last_up() at C:\Users\dvets\.julia\packages\SearchLight\0MG55\src\Migration.jl:118
 [5] top-level scope at none:1

But if I run methods(SearchLight.query) it returns no methods...

I'm pretty far out of my depth here so I'm not sure what I am getting wrong.

Windows 10 Julia 1.5.3 Genie 1.9.1

dvetsch75 commented 3 years ago

Accidentally duplicated https://github.com/GenieFramework/SearchLight.jl/issues/33