architex/priv/repo/migrations/20210823083642_create_joined_rooms_table.exs

17 lines
420 B
Elixir
Raw Normal View History

defmodule MatrixServer.Repo.Migrations.CreateJoinedRoomsTable do
use Ecto.Migration
def change do
create table(:joined_rooms, primary_key: false) do
add :localpart,
references(:accounts, column: :localpart, type: :string),
primary_key: true,
null: false
add :room_id, references(:rooms, type: :string),
primary_key: true,
null: false
end
end
end