PostgreSQL cannot change column position. There is no AFTER, BEFORE, FIRST, or ALTER COLUMN ... POSITION. Those are MySQL. ADD COLUMN always appends. REPACK and CLUSTER reorder rows, not columns. Do not rotate columns by adding new ones, copying values, and dropping the old ones. That burns attnum and often changes the type.
Reorder only when explicitly asked. Never tidy column order as a side effect. Never edit a migration that has already been applied. If the CREATE TABLE file has never been applied anywhere, change the column order in that file and stop. No table swap.
id is always the first column. Do not move it to suit alignment. If the table has no id, do not invent one and do not pull another column to the front.
