Skip to content

Commit

Permalink
Update schema_statements.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanharan committed Aug 14, 2024
1 parent 19cc61e commit 15848c2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ def view_information(table_name)
identifier = SQLServer::Utils.extract_identifiers(table_name)
information_query_table = identifier.database.present? ? "[#{identifier.database}].[INFORMATION_SCHEMA].[VIEWS]" : "[INFORMATION_SCHEMA].[VIEWS]"

view_info = select_one("SELECT * FROM #{information_query_table} WITH (NOLOCK) WHERE TABLE_NAME = #{quote(identifier.object)}", "SCHEMA")
view_info = select_one("SELECT * FROM #{information_query_table} WITH (NOLOCK) WHERE TABLE_NAME = #{quote(identifier.object)}", "SCHEMA").to_h

if view_info
if view_info['VIEW_DEFINITION'].blank? || view_info['VIEW_DEFINITION'].length == 4000
Expand Down

0 comments on commit 15848c2

Please sign in to comment.