Revision of the iteration 1 plan from the original design doc. Changes are driven by a critique pass; each addresses a specific weakness in the original plan.
0a. Behavior-capture specs. As originally scoped.
Revision of the iteration 1 plan from the original design doc. Changes are driven by a critique pass; each addresses a specific weakness in the original plan.
0a. Behavior-capture specs. As originally scoped.
Move the rules that compute a cycle's due_date and payout_date into two stand-alone policy objects (HG::Billing::DueDatePolicy, HG::Billing::PayoutDatePolicy), constructed with the client and called at cycle creation time. The Cycle model keeps its due_date / payout_date columns and read API unchanged — only the computation moves out. This is step 1 of the iteration-1 refactor: variation that currently lives as private helpers on the model gets pulled into named classes so future date schemes (Net X, end-of-month, custom days) become new policy classes rather than new branches inside Cycle. Behavior is unchanged.
HG::Billing::DueDatePolicy and HG::Billing::PayoutDatePolicy exist; the listed Cycle#* date methods are removed and the persisted due_date / payout_date columns are populated by the policies at cycle creation.| UPDATE pg_database SET datallowconn = TRUE WHERE datname = 'template0'; | |
| \c template0 | |
| UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1'; | |
| DROP DATABASE template1; | |
| CREATE DATABASE template1 WITH TEMPLATE = 'template0'; | |
| \c template1 | |
| UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1'; | |
| UPDATE pg_database SET datallowconn = FALSE WHERE datname = 'template0'; |
| ffmpeg -i {filename} -acodec aac -ac 2 -strict experimental -ab 160k -s {ssize} -vcodec libx264 -preset slow -profile:v baseline -level 30 -maxrate 10000000 -bufsize 10000000 -b 1200k -f mp4 -threads 0 {filename}.ipad.mp4 |
| WITH RECURSIVE tables_tree (table_oid, path) AS ( | |
| SELECT I.inhparent AS table_oid, '{}'::oid[] AS path | |
| FROM pg_inherits I | |
| LEFT JOIN pg_inherits I2 ON I.inhparent = I2.inhrelid | |
| WHERE I2.inhparent IS NULL | |
| UNION | |
| SELECT I.inhrelid, TT.path || I.inhparent | |
| FROM pg_inherits I |