parent
222de719ea
commit
1678fa10f4
|
|
@ -0,0 +1,12 @@
|
|||
defmodule Plausible.Repo.Migrations.TrackAcceptTrafficUntilNotifcations do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create table(:sent_accept_traffic_until_notifications) do
|
||||
add :user_id, references(:users, on_delete: :delete_all), null: false
|
||||
add :sent_on, :date, null: false
|
||||
end
|
||||
|
||||
create unique_index(:sent_accept_traffic_until_notifications, [:user_id, :sent_on])
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
defmodule Plausible.Repo.Migrations.AddAcceptTrafficUntilToUser do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
# deleting accept_traffic_until from sites table will come later, not to crash anything live right now
|
||||
alter table(:users) do
|
||||
add :accept_traffic_until, :date
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Reference in New Issue