This commit is contained in:
seb
2026-10-12 19:48:07 +02:00
parent 64d1772842
commit 28e62093b3
25 changed files with 979 additions and 125 deletions

View File

@@ -5,8 +5,8 @@ const queries = translateQueries(source, 'numbers');
export const { GET_BY_COMPANY_AND_ID, LIST_BY_COMPANY, UPDATE_BY_COMPANY_AND_ID } = queries;
export const ENSURE_TYPE = `
INSERT INTO numbers (company_id, "type")
VALUES (@companyId, @type)
INSERT INTO numbers (company_id, "type", prefix)
VALUES (@companyId, @type, COALESCE(@prefix, ''))
ON CONFLICT (company_id, "type") DO NOTHING
`;