Skip to content

Commit

Permalink
delete message in dm_messages table in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
Irere123 committed Jul 25, 2024
1 parent ed7a360 commit 7aaea52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/priv/repo/migrations/20240724174530_update.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ defmodule Telescope.Repo.Migrations.Update do
use Ecto.Migration

def change do
execute("DELETE FROM dm_messages;")

alter table(:dm_messages) do
remove(:dmId)
remove(:userId)
Expand All @@ -10,7 +12,6 @@ defmodule Telescope.Repo.Migrations.Update do
add(:user_id, references(:users, on_delete: :delete_all, type: :uuid), null: false)
end

execute("DELETE FROM dm_messages;")
drop(table(:dm_users))
drop(table(:dms))
end
Expand Down

0 comments on commit 7aaea52

Please sign in to comment.