diff options
Diffstat (limited to 'priv/repo/migrations')
-rw-r--r-- | priv/repo/migrations/20181214121049_add_bookmarks_to_users.exs | 9 | ||||
-rw-r--r-- | priv/repo/migrations/20190123125546_create_instances.exs | 15 |
2 files changed, 24 insertions, 0 deletions
diff --git a/priv/repo/migrations/20181214121049_add_bookmarks_to_users.exs b/priv/repo/migrations/20181214121049_add_bookmarks_to_users.exs new file mode 100644 index 000000000..55e97ae0e --- /dev/null +++ b/priv/repo/migrations/20181214121049_add_bookmarks_to_users.exs @@ -0,0 +1,9 @@ +defmodule Pleroma.Repo.Migrations.AddBookmarksToUsers do + use Ecto.Migration + + def change do + alter table(:users) do + add :bookmarks, {:array, :string}, null: false, default: [] + end + end +end diff --git a/priv/repo/migrations/20190123125546_create_instances.exs b/priv/repo/migrations/20190123125546_create_instances.exs new file mode 100644 index 000000000..b527ad7ec --- /dev/null +++ b/priv/repo/migrations/20190123125546_create_instances.exs @@ -0,0 +1,15 @@ +defmodule Pleroma.Repo.Migrations.CreateInstances do + use Ecto.Migration + + def change do + create table(:instances) do + add :host, :string + add :unreachable_since, :naive_datetime + + timestamps() + end + + create unique_index(:instances, [:host]) + create index(:instances, [:unreachable_since]) + end +end |