Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion app/models/apikey.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ module.exports = (sequelize, Sequelize) => {
},
akKEY: {
field: 'akKEY',
type: Sequelize.STRING
// Migration 20260518000000-hash-api-keys.js changed the DB
// column from `uuid` to `text` so it can hold a SHA-256
// hex digest (64 chars) without a length cap. The model
// had been left at `Sequelize.STRING` (varchar(255)),
// which doesn't break runtime — hashes fit comfortably
// — but `sequelize.sync()` and any schema-introspection
// tooling would disagree with the DB. Use TEXT to match.
type: Sequelize.TEXT
},
akCompanyId: {
field: 'akCompanyId',
Expand Down
7 changes: 6 additions & 1 deletion app/models/apimaster.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ module.exports = (sequelize, Sequelize) => {
},
amKEY: {
field: 'amKEY',
type: Sequelize.STRING
// Same DB column-type change as ApiKey.akKEY — see
// migration 20260518000000-hash-api-keys.js. The column
// is TEXT in PG; the model previously declared STRING
// (varchar(255)) which still works at runtime but drifts
// from the DB schema. Aligned to TEXT for parity.
type: Sequelize.TEXT
},
amArchive: {
field: 'amArchive',
Expand Down