- Shipped
- 24 Agosti 2026, 21:02 UTC
- Author
- Kamo
- Commit
- 761d9d2
users.last_org_id backs the workspace picker. An organization is no longer named by the hostname, so a member who belongs to several chooses one after signing in; this column stops that being a fresh decision every morning. One statement, unlike UserIsFakeMigration's four. That column ends up NOT NULL with a DEFAULT and Yugabyte rejects ADD COLUMN ... NOT NULL on a populated table. This one is deliberately nullable with no default and no foreign key: NULL is the meaningful value for "has not chosen yet", which is every account predating the picker, and a foreign key would let a deleted org block a sign-in. A stale id is harmless -- the picker only uses it to preselect a row it is already listing. Already applied to the live database, since this service has no CI and pushing it ships nothing; this is what gives a fresh environment the column.