You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4. Enable the plugin in `Plugins` → `Manage and Install Plugins` → `Installed`
34
-
35
-
## Usage
36
-
37
-
### PostgreSQL Template Management
38
-
39
-
#### Creating a Template
40
-
1. Open the KGR Toolbox plugin
41
-
2. Go to the **Database Connection** tab
42
-
3. Enter your PostgreSQL connection details
43
-
4. Click **Test Connection**
44
-
5. Switch to the **Create Template** tab
45
-
6. Select source database and enter template name
46
-
7. Click **Create Template**
47
-
48
-
#### Deploying from Template
49
-
1. Ensure your connection is configured
50
-
2. Go to the **Deploy Template** tab
51
-
3. Select the template database
52
-
4. Enter new database name
53
-
5. Click **Deploy Database**
54
-
55
-
### Creating Portable Archives
56
-
57
-
#### Export Project Archive
58
-
1. Open your QGIS project with PostgreSQL layers
59
-
2. Open the KGR Toolbox plugin
60
-
3. Go to the **Archive Project** tab
61
-
4. Select output folder
62
-
5. Click **Create Portable Archive**
63
-
64
-
The plugin will:
65
-
- Copy all project files and folders (including DCIM)
66
-
- Convert all PostgreSQL layers to a single geopackage
67
-
- Update the project file to use geopackage sources
68
-
- Create a portable `_portable.qgs` file
69
-
70
-
#### Warning
71
-
The archive process copies ALL files from your project directory, including DCIM folders which may be quite large. Choose your output location carefully.
72
-
73
-
## Requirements
74
-
75
-
- QGIS 3.0 or higher
76
-
- PostgreSQL database with appropriate permissions
77
-
- Python 3.6+ (included with QGIS)
78
-
79
-
## Supported Formats
80
-
81
-
### Input
82
-
- PostgreSQL databases
83
-
- QGIS projects (.qgs files)
84
-
- All standard QGIS vector layers
85
-
86
-
### Output
87
-
- PostgreSQL templates
88
-
- Geopackage (.gpkg)
89
-
- Portable QGIS projects
90
-
91
-
## Technical Details
92
-
93
1
### SQL Commands for Template Creation
94
2
95
3
When creating a clean template from a database, the plugin executes the following SQL commands in sequence:
96
4
97
5
#### 1. Disconnect Active Users
98
6
```sql
99
7
-- Terminate all active connections to the source database
0 commit comments