2019-03-08 12:25:06 +01:00
|
|
|
defmodule Mobilizon.Repo.Migrations.FeedTokenTable do
|
|
|
|
use Ecto.Migration
|
|
|
|
|
|
|
|
def change do
|
2019-03-08 18:52:27 +01:00
|
|
|
create table(:feed_tokens, primary_key: false) do
|
|
|
|
add(:token, Ecto.UUID.type(), primary_key: true)
|
2019-03-08 12:25:06 +01:00
|
|
|
add(:actor_id, references(:actors, on_delete: :delete_all), null: true)
|
|
|
|
add(:user_id, references(:users, on_delete: :delete_all), null: false)
|
|
|
|
|
|
|
|
timestamps(updated_at: false)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|