Create a template loader for SQL templates.

This will automatically find the correct version of a template for the server version, and allows us to remove templates that were previously duplicated for different server versions.

Patch by George & Tira at Pivotal. Review by me and Murtuza from EDB.

Discussion: https://www.postgresql.org/message-id/flat/CAHowoHaU9_pkCt%2B1g8dpY3hsXXZmsJZiJH-3-_Hd%2BC1MxiGhtA%40mail.gmail.com#CAHowoHaU9_pkCt+1g8dpY3hsXXZmsJZiJH-3-_Hd+C1MxiGhtA@mail.gmail.com
This commit is contained in:
George Gelashvili
2017-01-30 11:25:02 +00:00
committed by Dave Page
parent 42d3121369
commit 19be3529f8
275 changed files with 137 additions and 4107 deletions

View File

@@ -30,6 +30,7 @@ import config
# Get the config database schema version. We store this in pgadmin.model
# as it turns out that putting it in the config files isn't a great idea
from pgadmin.model import SCHEMA_VERSION
from pgadmin.utils.versioned_template_loader import VersionedTemplateLoader
config.SETTINGS_SCHEMA_VERSION = SCHEMA_VERSION