mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-04 20:14:57 +08:00
Revert migration
This commit is contained in:
parent
ecfa69788a
commit
86244ce1b3
1 changed files with 1 additions and 15 deletions
|
@ -11,7 +11,6 @@ defmodule Livebook.Migration do
|
|||
def run() do
|
||||
insert_personal_hub()
|
||||
remove_offline_hub()
|
||||
remove_cli_hub()
|
||||
|
||||
storage_version =
|
||||
case Storage.fetch_key(:system, "global", :migration_version) do
|
||||
|
@ -31,7 +30,7 @@ defmodule Livebook.Migration do
|
|||
Livebook.Hubs.save_hub(%Livebook.Hubs.Personal{
|
||||
id: Livebook.Hubs.Personal.id(),
|
||||
hub_name: "Personal",
|
||||
hub_emoji: "🏠",
|
||||
hub_emoji: "🝠",
|
||||
secret_key: Livebook.Hubs.Personal.generate_secret_key()
|
||||
})
|
||||
end
|
||||
|
@ -47,19 +46,6 @@ defmodule Livebook.Migration do
|
|||
end
|
||||
end
|
||||
|
||||
@deploy_key_prefix Livebook.Teams.Requests.deploy_key_prefix()
|
||||
|
||||
defp remove_cli_hub() do
|
||||
# The CLI hub will only be present in the storage if the
|
||||
# user doesn't have the Team hub already persisted with the
|
||||
# user credentials. Consequently, we always remove it and
|
||||
# insert on CLI if applicable.
|
||||
|
||||
for %{id: "team-" <> _ = id, session_token: @deploy_key_prefix <> _} <- Storage.all(:hubs) do
|
||||
:ok = Storage.delete(:hubs, id)
|
||||
end
|
||||
end
|
||||
|
||||
defp migration(1) do
|
||||
v1_add_personal_hub_secret_key()
|
||||
v1_delete_local_host_hub()
|
||||
|
|
Loading…
Add table
Reference in a new issue