Repository navigation
v0.18.2
Root module: v0.18.2; nested modules unchanged. Fix; no migration.
Fixed
porte/kitfills the timestamps a GORM table leaves without a default, and names the rest.
kit.Storecreated an account with an insert naming only the columns it knows. About half the
suite's apps createuserswith GORMAutoMigrate, which declarescreated_atand
updated_atwith no DEFAULT because GORM filled them in Go. Agenda's first kit sign-up wrote
created_atNULL and was fixed in the app with anOnCreatehook; every other GORM app would
have hit the same thing silently.kit.NewStorenow reads the table's columns once, at
construction.ColumnsgainsCreatedAtandUpdatedAt: the kit writesnow()into both on
insert and intoUpdatedAton every update it makes (sign-in refresh,BackfillPictures).
Left empty, a timestamp column namedcreated_atorupdated_atwith no default, identity or
generated expression is adopted; one with a default stays the database's.Store.Unwritten()
lists the nullable columns with no default the insert leaves out, logged once at warn when no
OnCreateis set. It is a warning, not an error: some apps leave columns NULL on purpose.
OnCreateruns after the insert and wins, so Agenda's hook, which also setscreated_at = now(), writes the same transaction timestamp and nothing conflicts.NewStorealso fails at
boot when the table or a named column is missing, which used to fail at the first sign-in.
Akit.Storeliteral behaves exactly as in v0.18.1, so Sonde, Antenne, Capsule, Agenda and
Casier see no change until they move toNewStore. No route, status code, cookie, CSRF rule,
/auth/configbody orpg.Schemachanges, andoidc,sessionandpgare untouched.