You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refresh pagila-data.sql with more diverse, less repetitive sample data:
Grow the customer base from 599 to 999, with signups spread across 2022-2026 instead of a single date
Grow rental activity from ~16k to ~51.8k rows, and payments from ~16k to ~51k rows, spanning January 2022 through July 2026 instead of a few months in 2022
Randomize last_update/create_date timestamps across all tables instead of reusing one fixed value per table
Add 48 new monthly partitions to the payment table in pagila-schema.sql (Aug 2022 - Jul 2026) to support the extended date range
Add scripts/add_monthly_data.sh to keep a running pagila instance current: creates the next payment partition and populates a month of new rental/payment activity, meant to be scheduled monthly
Rework the actor_info view to return a JSONB column (film titles grouped by category) instead of a concatenated text string, so it's a domain-relevant example for practicing JSONB operators (fixes #21)
Change language.name from character(20) to text, and strip the trailing blank-padding it left in the shipped data, matching the text-everywhere convention used by every other column (fixes #33)
Document PostgreSQL 17's SQL/JSON query functions (JSON_EXISTS(), JSON_VALUE(), JSON_QUERY()), JSON_TABLE(), and the constructor functions (JSON(), JSON_SCALAR(), JSON_SERIALIZE()) in the README, with example queries verified against actor_info
Raise the minimum supported PostgreSQL version to 18
Bump docker-compose.yml to the postgres:18 image, and move the pgdata volume mount from /var/lib/postgresql/data to /var/lib/postgresql — the 18+ images refuse to start with a volume mounted at the old path (see docker-library/postgres#1259); verified with a full docker compose up
Set POSTGRES_DB: pagila in docker-compose.yml (and fix restore-pagila-data-jsonb.sh to restore into it) so docker-compose up actually loads data into a pagila database, matching the README's own \c pagila instructions instead of silently loading everything into the default postgres database
Add a uuid column (DEFAULT uuidv7(), unique-indexed) to customer, rental, and payment, demonstrating PostgreSQL 18's new UUID functions
Regenerate pagila-insert-data.sql from the same data as pagila-data.sql — it had drifted badly out of sync (e.g. every film's release_year was hardcoded to 2006 regardless of the real value), fixes #39
Fix 400 of the 999 customers added in the 4.0.0 data refresh all being named "ELIZABETH HALL" — an uncorrelated scalar subquery in the name-generation script was evaluated once instead of per-row (the same bug class as the earlier create_date fix); regenerated with proper per-row random names
Add a Dockerfile (building pg_partman 5.5.0 from source on postgres:18) and hand the payment table's future partitions over to it instead of creating them by hand, while leaving the existing Jan 2022 - Jul 2026 partitions untouched; maintenance runs via scripts/run_partman_maintenance.sh on cron (partman.run_maintenance_proc(0, true, true)) rather than pg_partman's own background worker, and scripts/add_monthly_data.sh calls the same procedure as a safety net