KamoCRM

Remember the last workspace a member signed in to

FeatureInitializerService
Shipped
24 ஆகஸ்ட், 2026 அன்று 9:02 PM 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.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing