rename shot groups to shot records in database

This commit is contained in:
shibao 2023-03-30 21:39:08 -04:00
parent e0e7b25bc4
commit 98775359af

View File

@ -0,0 +1,19 @@
defmodule Cannery.Repo.Migrations.RenameShotGroupsToShotRecords do
use Ecto.Migration
def up do
drop index(:shot_groups, [:user_id, :pack_id])
flush()
rename table(:shot_groups), to: table(:shot_records)
end
def down do
rename table(:shot_records), to: table(:shot_groups)
flush()
create index(:shot_groups, [:user_id, :pack_id])
end
end