restart config id after truncate
authorAlexander Strizhakov <alex.strizhakov@gmail.com>
Thu, 23 Jan 2020 14:48:45 +0000 (17:48 +0300)
committerAlexander Strizhakov <alex.strizhakov@gmail.com>
Thu, 23 Jan 2020 14:48:45 +0000 (17:48 +0300)
lib/mix/tasks/pleroma/config.ex

index 8098e9bab81cc5e5749da979d8738797ee5906a0..3e76d2c970977b2fea15bdb5df97aa33ee8d2894 100644 (file)
@@ -53,6 +53,7 @@ defmodule Mix.Tasks.Pleroma.Config do
   defp do_migrate_to_db(config_file) do
     if File.exists?(config_file) do
       Ecto.Adapters.SQL.query!(Repo, "TRUNCATE config;")
+      Ecto.Adapters.SQL.query!(Repo, "ALTER SEQUENCE config_id_seq RESTART;")
 
       custom_config =
         config_file