fixed migration the settings to DB

This commit is contained in:
Maksim Pechnikov 2020-06-17 09:15:35 +03:00
commit 02a5648feb
3 changed files with 20 additions and 15 deletions

View file

@ -52,6 +52,7 @@ defmodule Mix.Tasks.Pleroma.Config do
defp do_migrate_to_db(config_file) do
if File.exists?(config_file) do
shell_info("Running migrate settings from file: #{Path.expand(config_file)}")
Ecto.Adapters.SQL.query!(Repo, "TRUNCATE config;")
Ecto.Adapters.SQL.query!(Repo, "ALTER SEQUENCE config_id_seq RESTART;")