mirror of
https://github.com/plausible/analytics.git
synced 2024-11-26 23:27:54 +03:00
Remove historical migrations that stop test database from being created
This commit is contained in:
parent
c5704c4e09
commit
edca2a57df
@ -4,13 +4,7 @@ defmodule Plausible.Repo.Migrations.AddNewVisitorToPageviews do
|
||||
|
||||
def change do
|
||||
alter table(:pageviews) do
|
||||
add :new_visitor, :boolean
|
||||
end
|
||||
flush()
|
||||
Plausible.Repo.update_all(Plausible.Pageview, [set: [new_visitor: true]])
|
||||
flush()
|
||||
alter table(:pageviews) do
|
||||
modify :new_visitor, :boolean, null: false
|
||||
add :new_visitor, :boolean, null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -4,15 +4,7 @@ defmodule Plausible.Repo.Migrations.AddUidToPageviews do
|
||||
|
||||
def change do
|
||||
alter table(:pageviews) do
|
||||
add :user_id, :binary_id
|
||||
end
|
||||
|
||||
flush()
|
||||
|
||||
Repo.update_all(Plausible.Pageview, set: [user_id: "00029281-7f8b-462d-a9f0-0d2ddfc6ea02"])
|
||||
|
||||
alter table(:pageviews) do
|
||||
modify :user_id, :string, null: false
|
||||
add :user_id, :binary_id, null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -2,9 +2,6 @@ defmodule Plausible.Repo.Migrations.ChangeUserIdToUuid do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
execute("DELETE from pageviews where user_id='123'")
|
||||
execute("UPDATE pageviews set user_id='de610e53-6ec6-4e33-be37-7adcc1bf13be' where user_id='dummy'")
|
||||
flush()
|
||||
execute("ALTER TABLE pageviews ALTER COLUMN user_id TYPE uuid USING user_id::uuid")
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user