Make tests great again !
(Also use only one field for public/private key pem) Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
15
priv/repo/migrations/20180607095732_add_uuid_to_comments.exs
Normal file
15
priv/repo/migrations/20180607095732_add_uuid_to_comments.exs
Normal file
@@ -0,0 +1,15 @@
|
||||
defmodule Eventos.Repo.Migrations.AddUUIDToComments do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
alter table(:comments) do
|
||||
add :uuid, :uuid
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
alter table(:comments) do
|
||||
remove :uuid
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,15 @@
|
||||
defmodule Eventos.Repo.Migrations.MakeSharedInboxUrlNullable do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
alter table(:actors) do
|
||||
modify :shared_inbox_url, :string, null: true, default: nil
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
alter table(:actors) do
|
||||
add :shared_inbox_url, :string, null: false, default: ""
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,17 @@
|
||||
defmodule Eventos.Repo.Migrations.FusionPublicPrivateKeyIntoKeysColumn do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
rename table(:actors), :private_key, to: :keys
|
||||
alter table(:actors) do
|
||||
remove :public_key
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
alter table(:actors) do
|
||||
rename :keys, to: :private_key
|
||||
add :public_key, :text, null: true
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,23 @@
|
||||
defmodule Eventos.Repo.Migrations.AddAttributedToFieldToEventsAndComments do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
alter table(:events) do
|
||||
add :attributed_to_id, references(:actors, on_delete: :nothing)
|
||||
end
|
||||
|
||||
alter table(:comments) do
|
||||
add :attributed_to_id, references(:actors, on_delete: :nothing)
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
alter table(:events) do
|
||||
remove :attributed_to_id
|
||||
end
|
||||
|
||||
alter table(:comments) do
|
||||
remove :attributed_to_id
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user