From 45e13b614966a88b34a4cde3a82365eac48f67ed Mon Sep 17 00:00:00 2001 From: a-ill Date: Sat, 22 Jul 2023 13:48:47 +0300 Subject: [PATCH] Fixed db init --- Server/db/init_db.jl | 5 ++--- .../2022026611846566_create_table_groups_requests.jl | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Server/db/init_db.jl b/Server/db/init_db.jl index a8ad902..ea6d224 100644 --- a/Server/db/init_db.jl +++ b/Server/db/init_db.jl @@ -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 diff --git a/Server/db/migrations/2022026611846566_create_table_groups_requests.jl b/Server/db/migrations/2022026611846566_create_table_groups_requests.jl index b4e74a0..414672d 100644 --- a/Server/db/migrations/2022026611846566_create_table_groups_requests.jl +++ b/Server/db/migrations/2022026611846566_create_table_groups_requests.jl @@ -26,7 +26,7 @@ function up() end function down() - drop_table(:groups) + drop_table(:groups_requests) end end \ No newline at end of file