mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix the issue of accessing the SQL for Views and Materialized Views. Regression of pluralisation of folder names. Fixes #4308
This commit is contained in:
@@ -1540,7 +1540,7 @@ class FunctionView(PGChildNodeView, DataTypeReader):
|
||||
# Get schema name
|
||||
status, schema_name = self.conn.execute_scalar(
|
||||
render_template(
|
||||
'schema/pg/#{0}#/sql/get_name.sql'.format(
|
||||
'schemas/pg/#{0}#/sql/get_name.sql'.format(
|
||||
self.manager.version),
|
||||
scid=scid
|
||||
)
|
||||
|
||||
@@ -844,7 +844,7 @@ class SequenceView(PGChildNodeView):
|
||||
# Get schema name
|
||||
status, schema_name = self.conn.execute_scalar(
|
||||
render_template(
|
||||
'schema/pg/#{0}#/sql/get_name.sql'.format(
|
||||
'schemas/pg/#{0}#/sql/get_name.sql'.format(
|
||||
self.manager.version
|
||||
),
|
||||
scid=scid
|
||||
|
||||
@@ -83,7 +83,7 @@ class IndexesModule(CollectionNodeModule):
|
||||
if 'vid' not in kwargs:
|
||||
return True
|
||||
|
||||
template_path = 'index/sql/#{0}#'.format(manager.version)
|
||||
template_path = 'indexes/sql/#{0}#'.format(manager.version)
|
||||
SQL = render_template(
|
||||
"/".join([template_path, 'backend_support.sql']),
|
||||
vid=kwargs['vid']
|
||||
|
||||
@@ -771,7 +771,7 @@ class ViewNode(PGChildNodeView, VacuumSettings):
|
||||
Updated properties data with column details
|
||||
"""
|
||||
|
||||
self.index_temp_path = 'index'
|
||||
self.index_temp_path = 'indexes'
|
||||
SQL = render_template("/".join([self.index_temp_path,
|
||||
'sql/#{0}#/column_details.sql'.format(
|
||||
self.manager.version)]), idx=idx)
|
||||
@@ -825,7 +825,7 @@ class ViewNode(PGChildNodeView, VacuumSettings):
|
||||
Updated properties data with column
|
||||
"""
|
||||
|
||||
self.trigger_temp_path = 'schema/trigger'
|
||||
self.trigger_temp_path = 'schemas/triggers'
|
||||
SQL = render_template("/".join([self.trigger_temp_path,
|
||||
'get_columns.sql']),
|
||||
tid=tid, clist=clist)
|
||||
@@ -887,7 +887,7 @@ class ViewNode(PGChildNodeView, VacuumSettings):
|
||||
import trigger_definition
|
||||
|
||||
# Define template path
|
||||
self.trigger_temp_path = 'trigger'
|
||||
self.trigger_temp_path = 'triggers'
|
||||
|
||||
SQL_data = ''
|
||||
SQL = render_template("/".join(
|
||||
@@ -970,7 +970,7 @@ class ViewNode(PGChildNodeView, VacuumSettings):
|
||||
into sql tab
|
||||
"""
|
||||
|
||||
self.index_temp_path = 'index'
|
||||
self.index_temp_path = 'indexes'
|
||||
SQL_data = ''
|
||||
SQL = render_template("/".join(
|
||||
[self.index_temp_path,
|
||||
|
||||
Reference in New Issue
Block a user