Merge pull request 'Add dark and light theme mode to docs, detection, and button...
[akkoma] / priv / repo / migrations / 20190328053912_create_scheduled_activities.exs
1 defmodule Pleroma.Repo.Migrations.CreateScheduledActivities do
2 use Ecto.Migration
3
4 def change do
5 create_if_not_exists table(:scheduled_activities) do
6 add(:user_id, references(:users, type: :uuid, on_delete: :delete_all))
7 add(:scheduled_at, :naive_datetime, null: false)
8 add(:params, :map, null: false)
9
10 timestamps()
11 end
12
13 create_if_not_exists(index(:scheduled_activities, [:scheduled_at]))
14 create_if_not_exists(index(:scheduled_activities, [:user_id]))
15 end
16 end