From 225aa1499e37faf9d38257caabbadc68d78b427e Mon Sep 17 00:00:00 2001
From: Lucas Faria Mendes <lucas.fariamo08@gmail.com>
Date: Mon, 30 Mar 2026 12:29:41 -0300
Subject: decompiler.com

---
 .../Gestor.Application.Migration.Files.20210607_122.SQL       | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 Decompiler/Gestor.Application.Migration.Files.20210607_122.SQL

(limited to 'Decompiler/Gestor.Application.Migration.Files.20210607_122.SQL')

diff --git a/Decompiler/Gestor.Application.Migration.Files.20210607_122.SQL b/Decompiler/Gestor.Application.Migration.Files.20210607_122.SQL
new file mode 100644
index 0000000..e9ef686
--- /dev/null
+++ b/Decompiler/Gestor.Application.Migration.Files.20210607_122.SQL
@@ -0,0 +1,11 @@
+DECLARE @has_column NVARCHAR(MAX), @table_name NVARCHAR(MAX), @column_name NVARCHAR(MAX), @column_type NVARCHAR(MAX)
+SET @table_name = '[dbo].[recibo]'
+SET @column_name = 'tiporecibo'
+SELECT @has_column = COL_LENGTH(@table_name, 'tiporecibo')
+
+SELECT @column_type = DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'recibo' AND COLUMN_NAME = 'tiporecibo'
+
+DECLARE @sql NVARCHAR(MAX) = N'ALTER TABLE ' + @table_name + N' ALTER COLUMN ' + @column_name + N' ' + CASE WHEN(@column_type = 'nvarchar' OR @column_type = 'varchar') THEN 'NVARCHAR(255)' ELSE 'INTEGER' END + N' NULL;'
+
+IF @has_column IS NOT NULL
+    exec sp_executesql @sql
\ No newline at end of file
-- 
cgit v1.2.3

