Fixed db init

This commit is contained in:
a-ill 2023-07-22 13:48:47 +03:00
parent 0c7ecef6c1
commit 0740981d5d
2 changed files with 3 additions and 4 deletions

View File

@ -25,8 +25,7 @@ SearchLight.Configuration.load() |> SearchLight.connect
#SearchLight.Migration.all_up!!(context=Server) #SearchLight.Migration.all_up!!(context=Server)
#SearchLight.Migration.status() #SearchLight.Migration.status()
cd(@__DIR__) p = "db/migrations/"
p = "migrations/"
files = readdir(p) files = readdir(p)
files = files[map(x -> x[end-1:end].=="jl", files)] files = files[map(x -> x[end-1:end].=="jl", files)]
inds = map(x -> parse(Int64,split(x,"_")[1]), files) inds = map(x -> parse(Int64,split(x,"_")[1]), files)
@ -35,7 +34,7 @@ files = files[inds_sorted]
for f in files for f in files
try try
m = include(joinpath(p,f)) m = include(joinpath("migrations",f))
m.up() m.up()
catch catch
end end

View File

@ -26,7 +26,7 @@ function up()
end end
function down() function down()
drop_table(:groups) drop_table(:groups_requests)
end end
end end