mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Move foreign key templates into a default directory.
This commit is contained in:
@@ -295,7 +295,7 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
|
|||||||
self.index_constraint_template_path = 'index_constraint/sql'
|
self.index_constraint_template_path = 'index_constraint/sql'
|
||||||
|
|
||||||
# Template for foreign key constraint node
|
# Template for foreign key constraint node
|
||||||
self.foreign_key_template_path = 'foreign_key/sql'
|
self.foreign_key_template_path = 'foreign_key/sql/#{0}#'.format(ver)
|
||||||
|
|
||||||
# Template for index node
|
# Template for index node
|
||||||
self.index_template_path = 'index/sql/#{0}#'.format(ver)
|
self.index_template_path = 'index/sql/#{0}#'.format(ver)
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ class ForeignKeyConstraintView(PGChildNodeView):
|
|||||||
kwargs['sid']
|
kwargs['sid']
|
||||||
)
|
)
|
||||||
self.conn = self.manager.connection(did=kwargs['did'])
|
self.conn = self.manager.connection(did=kwargs['did'])
|
||||||
self.template_path = 'foreign_key/sql'
|
self.template_path = 'foreign_key/sql/#{0}#'.format(self.manager.version)
|
||||||
|
|
||||||
# We need parent's name eg table name and schema name
|
# We need parent's name eg table name and schema name
|
||||||
SQL = render_template("/".join([self.template_path,
|
SQL = render_template("/".join([self.template_path,
|
||||||
@@ -369,7 +369,7 @@ class ForeignKeyConstraintView(PGChildNodeView):
|
|||||||
sid
|
sid
|
||||||
)
|
)
|
||||||
self.conn = self.manager.connection(did=did)
|
self.conn = self.manager.connection(did=did)
|
||||||
self.template_path = 'foreign_key/sql'
|
self.template_path = 'foreign_key/sql/#{0}#'.format(self.manager.version)
|
||||||
|
|
||||||
# We need parent's name eg table name and schema name
|
# We need parent's name eg table name and schema name
|
||||||
SQL = render_template("/".join([self.template_path,
|
SQL = render_template("/".join([self.template_path,
|
||||||
@@ -485,7 +485,7 @@ class ForeignKeyConstraintView(PGChildNodeView):
|
|||||||
sid
|
sid
|
||||||
)
|
)
|
||||||
self.conn = self.manager.connection(did=did)
|
self.conn = self.manager.connection(did=did)
|
||||||
self.template_path = 'foreign_key/sql'
|
self.template_path = 'foreign_key/sql/#{0}#'.format(self.manager.version)
|
||||||
|
|
||||||
# We need parent's name eg table name and schema name
|
# We need parent's name eg table name and schema name
|
||||||
SQL = render_template("/".join([self.template_path,
|
SQL = render_template("/".join([self.template_path,
|
||||||
|
|||||||
Reference in New Issue
Block a user