Closed tlorans closed 2 years ago
Hi, I think you've forgotten something. In the tutorial you refer to the command looks like SearchLight.Migration.create_migrations_table(). You used SearchLight.create_migration_table() where the Migration is missing. Maybe this helps.
Hi, I think you've forgotten something. In the tutorial you refer to the command looks like SearchLight.Migration.create_migrations_table(). You used SearchLight.create_migration_table() where the Migration is missing. Maybe this helps.
Yeah sorry it was an error in my copy paste to the issue editor, but I did run SearchLight.Migration.create_migrations_table()
(and checked again to be sure).
@tlorans it's there, it should work: https://github.com/GenieFramework/SearchLightSQLite.jl/search?q=create_migrations_table
Can you provide more info (the steps you're taking) so we can reproduce?
Would it be possible to save the whole project to GitHub so we can see where the error occurs? Without this it would be a guessing. Maybe the clause "using SearchLigthSQLite.jl" is missing somewhere. If this is the case SearchLight will not find the function because in SearchLight.jl the function is only abstract.
Would it be possible to save the whole project to GitHub so we can see where the error occurs? Without this it would be a guessing. Maybe the clause "using SearchLigthSQLite.jl" is missing somewhere. If this is the case SearchLight will not find the function because in SearchLight.jl the function is only abstract.
Yes of course, please find the project here.
@tlorans it's there, it should work: https://github.com/GenieFramework/SearchLightSQLite.jl/search?q=create_migrations_table
Can you provide more info (the steps you're taking) so we can reproduce?
this step in the tutorial
Yes, so using this project.
I run:
]pkg activate .
]pkg instantiate
using Genie
using Watchtonight
using SearchLight
SearchLight.Migration.create_migrations_table()
And now I've got this as output:
ERROR: MethodError: no method matching create_migrations_table()
Stacktrace:
[1] top-level scope
@ REPL[7]:1
I think I'm just lost in the various steps and environments following this issue.
Your script should be looking like this:
]pkg activate .
]pkg instantiate
using Genie
using Watchtonight
using SearchLight
using SearchLightSQLite
config_file = "Your path/to_your yml/connection.yml"
dict_config = SearchLight.Configuration.read_db_connection_data(config_file)
SearchLight.connect(dict_config)
SearchLight.Migration.create_migrations_table()
A little bit explanation:
I noticed during the tests that for now the SearchLight package can have some trouble with version numbers. If the error message comes up again, try the following:
This will reinstall SearchLight and eventual upcoming version clashes should go away.
HTH Frank
@FrankUrbach Thank you so much! It works perfectly !
Now you are up and running 👍 . The next time you have some trouble feel free to ask on Gitter: https://gitter.im/essenciary/Genie.jl or on Discord: https://discord.gg/G9hGxUTE. For now the community is more active on Gitter. It would be cool if you could close the issue and mark it as solved.
I will :)
Hello,
Finally I still have an issue in the following steps in the tutorial (after having run the commands you mentioned @FrankUrbach ).
I run:
SearchLight.Migration.status()
SearchLight.Migration.last_up()
```
And get the following output:
```
ERROR: BoundsError: attempt to access 0-element Vector{String} at index [0]
Stacktrace:
[1] getindex
@ ./array.jl:805 [inlined]
[2] last_migration
@ ~/.julia/packages/SearchLight/B9d2o/src/Migration.jl:266 [inlined]
[3] #last_up#11
@ ~/.julia/packages/SearchLight/B9d2o/src/Migration.jl:155 [inlined]
[4] last_up()
@ SearchLight.Migration ~/.julia/packages/SearchLight/B9d2o/src/Migration.jl:155
[5] top-level scope
@ REPL[12]:1
I think this is related to the fact that in the previous steps, when running:
Genie.newresource("movie")
┌ Error: UndefVarError(:UserApp)
└ @ Genie ~/.julia/packages/Genie/BAbYR/src/genie_module.jl:261
And the file ending by _create_movies_players.jl
is not automatically created, I had to create it manually without knowing what to put as name of the file (other than the ending).
I tried to follow your path and changed your things a little bit:
using Genie
using SearchLight
using SearchLightSQLite
Genie.loadapp() # needed to run thew newsource function without an error
Genie.newresource("movie") # create the ressource for you
SearchLight.Migration.status() # should work now
SearchLight.Migration.last_up() # shows an error in my environment maybe this isn't the case for you
HTH Frank
I tried to follow your path and changed your things a little bit:
using Genie using SearchLight using SearchLightSQLite Genie.loadapp() # needed to run thew newsource function without an error Genie.newresource("movie") # create the ressource for you SearchLight.Migration.status() # should work now SearchLight.Migration.last_up() # shows an error in my environment maybe this isn't the case for you
HTH Frank
Hello,
Sorry for the delay. Thank you for your try, I still have the same issue than you. Nevermind, I will use directly SQLite! Think I should close this issue then, as this blocking error is not exactly the same than the initial problem of this issue.
Best regards and thank you again!
I think we could change to Discord. I saw the problem by reading the generated migration file. There you have to specify what columns you want to include. But lets us discuss this on Discord.
Describe the bug Try to follow this step in the tutorial. I run the following command:
Error stacktrace
To reproduce Just follow this step in the tutorial
Expected behavior Create the DB table used by SearchLight's migration system.
Additional context