Fixed db init
This commit is contained in:
parent
0c7ecef6c1
commit
0740981d5d
|
@ -25,8 +25,7 @@ SearchLight.Configuration.load() |> SearchLight.connect
|
|||
#SearchLight.Migration.all_up!!(context=Server)
|
||||
#SearchLight.Migration.status()
|
||||
|
||||
cd(@__DIR__)
|
||||
p = "migrations/"
|
||||
p = "db/migrations/"
|
||||
files = readdir(p)
|
||||
files = files[map(x -> x[end-1:end].=="jl", files)]
|
||||
inds = map(x -> parse(Int64,split(x,"_")[1]), files)
|
||||
|
@ -35,7 +34,7 @@ files = files[inds_sorted]
|
|||
|
||||
for f in files
|
||||
try
|
||||
m = include(joinpath(p,f))
|
||||
m = include(joinpath("migrations",f))
|
||||
m.up()
|
||||
catch
|
||||
end
|
||||
|
|
|
@ -26,7 +26,7 @@ function up()
|
|||
end
|
||||
|
||||
function down()
|
||||
drop_table(:groups)
|
||||
drop_table(:groups_requests)
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in New Issue