action-requests-demo.jamey..../priv/repo/migrations/20251115093326_create_action_requests.exs
Jamey Greenwood de1b1bd484 Initial commit: Phoenix LiveView demo for interactive data tables with filtering, sorting, pagination, URL state, and progressive enhancement
Implements a fully-featured action requests table in a single LiveView module using Flop, Ecto, and SQLite. Includes:

- Fuzzy search, status/assignment filters, column sorting, 25-per-page pagination
- Real-time updates, bookmarkable URLs via `handle_params/3`
- JS-disabled fallback with GET forms (no duplicate logic)
- 1,000,000 seeded records, Tailwind + DaisyUI styling, light/dark themes
- Comprehensive README with comparisons to Django+React/Rails+React stacks
- 31 tests covering all scenarios

Tech: Phoenix 1.8+, LiveView, Flop, Ecto, SQLite, Elixir 1.15+
2025-11-16 10:24:06 +00:00

21 lines
621 B
Elixir

defmodule ActionRequestsDemo.Repo.Migrations.CreateActionRequests do
use Ecto.Migration
def change do
create table(:action_requests, primary_key: false) do
add :id, :binary_id, primary_key: true
add :patient_name, :string
add :status, :string
add :assigned_user_id, :integer
add :delivery_scheduled_at, :naive_datetime
timestamps(type: :utc_datetime)
end
create index(:action_requests, [:patient_name])
create index(:action_requests, [:status])
create index(:action_requests, [:assigned_user_id])
create index(:action_requests, [:inserted_at])
end
end