Add models and migrations
This commit is contained in:
parent
182523d36d
commit
9e542bc790
33 changed files with 597 additions and 125 deletions
14
priv/repo/migrations/20250606100445_create_bookmarks.exs
Normal file
14
priv/repo/migrations/20250606100445_create_bookmarks.exs
Normal file
|
@ -0,0 +1,14 @@
|
|||
defmodule Nulla.Repo.Migrations.CreateBookmarks do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create table(:bookmarks) do
|
||||
add :url, :string
|
||||
add :user_id, references(:users, on_delete: :delete_all)
|
||||
|
||||
timestamps(type: :utc_datetime)
|
||||
end
|
||||
|
||||
create index(:bookmarks, [:user_id])
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue