Skip to content

Commit e39f32c

Browse files
committed
feat: create drips table
1 parent a89988c commit e39f32c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
defmodule Algora.Repo.Migrations.CreateDripsTable do
2+
use Ecto.Migration
3+
4+
def change do
5+
create table(:drips, primary_key: false) do
6+
add :id, :string, primary_key: true
7+
add :user_ids, {:array, :string}, null: false
8+
add :org_id, references(:users, type: :string), null: false
9+
add :subject, :string
10+
add :body, :text
11+
add :email_addresses, {:array, :string}
12+
add :image_url, :string
13+
add :sent_at, :utc_datetime
14+
15+
timestamps()
16+
end
17+
18+
create index(:drips, [:org_id])
19+
create index(:drips, [:sent_at])
20+
create index(:drips, [:user_ids], using: :gin)
21+
end
22+
end

0 commit comments

Comments
 (0)