Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Squash migrations #223

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions priv/repos/configs/migrations/20161007140320_add_apis_table.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,17 @@ defmodule Annon.DB.Configs.Repo.Migrations.AddApisTable do

timestamps()
end

create unique_index(:apis, [:name])

columns = [
"(request->>'host')",
"(request->>'port')",
"(request->>'path')",
"(request->>'scheme')",
"(request->>'methods')"
]

create unique_index(:apis, columns, uniq: true, name: "api_unique_request_index")
end
end
1 change: 1 addition & 0 deletions priv/repos/configs/migrations/20161007140423_plugin.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ defmodule Annon.DB.Configs.Repo.Migrations.Plugin do
create table(:plugins) do
add :api_id, :integer
add :name, :string, size: 128
add :is_enabled, :boolean
add :settings, :map

timestamps()
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions priv/repos/configs/migrations/20161031153642_alter_uid2string.exs

This file was deleted.

14 changes: 0 additions & 14 deletions priv/repos/configs/migrations/20161104121123_add_index_on_apis.exs

This file was deleted.

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions priv/repos/configs/migrations/20161127090151_cleanup_consumers.exs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ defmodule Annon.DB.Logger.Repo.Migrations.AddLogsTable do
create table(:logs, primary_key: false) do
add :id, :string, primary_key: true
add :api, :map
add :consumer, :map
add :idempotency_key, :string
add :ip_address, :string
add :request, :map
Expand Down

This file was deleted.