/*月结账单发票分录表, 修改部分字段的长度*/
EXEC p_AlterColumn 'T_ER_CHECKINGINVOICE', 'FINVOICECODE', 'VARCHAR(255)', 'NOT NULL', '0100', ''' ''';

EXEC p_AlterColumn 'T_ER_CHECKINGINVOICE', 'FINVOICENO', 'VARCHAR(255)', 'NOT NULL', '0100', ''' ''';

-- 修改结算单发票识别标志字段长度
EXEC p_AlterColumn 'T_ER_PLANECHECKINGBILL', 'FINVOICEIDENTITYFLAG', 'VARCHAR(1)', 'NOT NULL', '0100', '''0''';

EXEC p_AlterColumn 'T_ER_TRAINCHECKINGBILL', 'FINVOICEIDENTITYFLAG', 'VARCHAR(1)', 'NOT NULL', '0100', '''0''';

-- 创建索引
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_INVOICE_FID') CREATE INDEX IDX_INVOICE_FID ON T_ER_CHECKINGINVOICE ( FID );

