Skip to content

Commit ab08dea

Browse files
committed
Add silenced column
1 parent 4763e55 commit ab08dea

File tree

6 files changed

+54
-3
lines changed

6 files changed

+54
-3
lines changed

lib/error_tracker/migration/mysql.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ defmodule ErrorTracker.Migration.MySQL do
77
alias ErrorTracker.Migration.SQLMigrator
88

99
@initial_version 3
10-
@current_version 4
10+
@current_version 5
1111

1212
@impl ErrorTracker.Migration
1313
def up(opts) do
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
defmodule ErrorTracker.Migration.MySQL.V05 do
2+
@moduledoc false
3+
4+
use Ecto.Migration
5+
6+
def up(_opts) do
7+
alter table(:error_tracker_errors) do
8+
add :muted, :boolean, default: false, null: false
9+
end
10+
end
11+
12+
def down(_opts) do
13+
alter table(:error_tracker_errors) do
14+
remove :muted
15+
end
16+
end
17+
end

lib/error_tracker/migration/postgres.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ defmodule ErrorTracker.Migration.Postgres do
77
alias ErrorTracker.Migration.SQLMigrator
88

99
@initial_version 1
10-
@current_version 4
10+
@current_version 5
1111
@default_prefix "public"
1212

1313
@impl ErrorTracker.Migration
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
defmodule ErrorTracker.Migration.Postgres.V05 do
2+
@moduledoc false
3+
4+
use Ecto.Migration
5+
6+
def up(%{prefix: prefix}) do
7+
alter table(:error_tracker_errors, prefix: prefix) do
8+
add :muted, :boolean, default: false, null: false
9+
end
10+
end
11+
12+
def down(%{prefix: prefix}) do
13+
alter table(:error_tracker_errors, prefix: prefix) do
14+
remove :muted
15+
end
16+
end
17+
end

lib/error_tracker/migration/sqlite.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ defmodule ErrorTracker.Migration.SQLite do
77
alias ErrorTracker.Migration.SQLMigrator
88

99
@initial_version 2
10-
@current_version 4
10+
@current_version 5
1111

1212
@impl ErrorTracker.Migration
1313
def up(opts) do
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
defmodule ErrorTracker.Migration.SQLite.V05 do
2+
@moduledoc false
3+
4+
use Ecto.Migration
5+
6+
def up(_opts) do
7+
alter table(:error_tracker_errors) do
8+
add :muted, :boolean, default: false, null: false
9+
end
10+
end
11+
12+
def down(_opts) do
13+
alter table(:error_tracker_errors) do
14+
remove :muted
15+
end
16+
end
17+
end

0 commit comments

Comments
 (0)