Add oban web, securities table and accounts table
This commit is contained in:
15
priv/repo/migrations/20250127162154_add_accounts_table.exs
Normal file
15
priv/repo/migrations/20250127162154_add_accounts_table.exs
Normal file
@@ -0,0 +1,15 @@
|
||||
defmodule Tradex.Repo.Migrations.AddAccountsTable do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create table(:accounts, primary_key: false) do
|
||||
add :id, :binary_id, primary_key: true
|
||||
add :name, :string, null: false
|
||||
|
||||
add :owner_id, references(:users, type: :binary_id), null: false
|
||||
timestamps(type: :utc_datetime)
|
||||
end
|
||||
|
||||
create index(:accounts, [:owner_id])
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user