2
0
mirror of https://github.com/frappe/books.git synced 2024-12-22 10:58:59 +00:00

fix: patch to fix wrong field datatype of hsnCode

This commit is contained in:
akshayitzme 2024-11-04 12:33:22 +05:30
parent 47ed0f9397
commit 3c19580471
2 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,11 @@
import { DatabaseManager } from '../database/manager';
async function execute(dm: DatabaseManager) {
const knexSchema = dm.db?.knex?.schema;
await knexSchema?.alterTable('Item', (table) => {
table.text('hsnCode').alter();
});
}
export default { execute, beforeMigrate: true };

View File

@ -6,6 +6,7 @@ import testPatch from './testPatch';
import updateSchemas from './updateSchemas'; import updateSchemas from './updateSchemas';
import setPaymentReferenceType from './setPaymentReferenceType'; import setPaymentReferenceType from './setPaymentReferenceType';
import fixLedgerDateTime from './v0_21_0/fixLedgerDateTime'; import fixLedgerDateTime from './v0_21_0/fixLedgerDateTime';
import fixItemHSNField from './fixItemHSNField';
export default [ export default [
{ name: 'testPatch', version: '0.5.0-beta.0', patch: testPatch }, { name: 'testPatch', version: '0.5.0-beta.0', patch: testPatch },
@ -40,4 +41,5 @@ export default [
version: '0.21.2', version: '0.21.2',
patch: fixLedgerDateTime, patch: fixLedgerDateTime,
}, },
{ name: 'fixItemHSNField', version: '0.24.0', patch: fixItemHSNField },
] as Patch[]; ] as Patch[];