Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- *
- * BEGIN VERSION 0_3_20
- *
- */
- IF NOT EXISTS (
- SELECT *
- FROM LBProConversion
- WHERE ConversionType = 'VER_0_3_20' AND IsDone = 1 AND [Type] = @TYPE)
- BEGIN
- BEGIN TRAN VER_0_3_20;
- PRINT('Begin of conversion for version : 0_3_20');
- IF NOT EXISTS (SELECT 1 FROM sysobjects o INNER JOIN syscolumns AS c ON c.Id = o.Id AND (c.Name = 'BarCodeFormat')
- WHERE o.XType = 'U' AND o.name = 'IRClient')
- BEGIN
- PRINT 'Rename IRClient.BarCodeFormat to IRClient.BarCodeFormatEquipment'
- EXEC sp_rename 'Intellirent.dbo.IRClient.BarCodeFormat', 'BarCodeFormatEquipment', 'COLUMN';
- PRINT 'Add columns BarCodeFormat in table IRClient'
- ALTER TABLE IRClient ADD BarCodeFormatDocument NVARCHAR(50) NULL
- ALTER TABLE IRClient ADD BarCodeFormat NVARCHAR(50) NULL
- IF @@ERROR <> 0 GOTO ERROR_0_3_20;
- END
- -----------------------------------------------------------------------
- -- INSERT ACTUAL VERSION 0_3_20
- INSERT INTO LBProConversion (ConversionType, IsDone, ConversionDateUTC, [Type])
- VALUES ('VER_0_3_20', 1, GETUTCDATE(), @TYPE)
- IF @@ERROR <> 0 GOTO ERROR_0_3_20;
- GOTO END_0_3_20;
- ERROR_0_3_20:
- PRINT('Error while converting to version : 0_3_20');
- ROLLBACK TRAN VER_0_3_20;
- GOTO ENDFILE;
- END_0_3_20:
- PRINT('Successful converting to version : 0_3_20');
- COMMIT TRAN VER_0_3_20;
- END
- /*
- *
- * END VERSION 0_3_20
- *
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement