Skip to content

Commit

Permalink
GPKG: insert GDAL_RELEASE_NICKNAME
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Feb 20, 2025
1 parent b51894d commit 9fff200
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion autotest/ogr/ogr_gpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -10833,7 +10833,7 @@ def test_gpkg_secure_delete(tmp_vsimem):
)
def test_ogr_gpkg_write_check_golden_file(tmp_path, src_filename):

out_filename = str(tmp_path / "test.gpkg")
out_filename = str(tmp_path / os.path.basename(src_filename))
with gdal.config_option("OGR_CURRENT_DATE", "2000-01-01T:00:00:00.000Z"):
gdal.VectorTranslate(out_filename, src_filename)

Expand Down
7 changes: 7 additions & 0 deletions ogr/ogrsf_frmts/gpkg/ogrgeopackagedatasource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5357,6 +5357,13 @@ int GDALGeoPackageDataset::Create(const char *pszFilename, int nXSize,
"table_name TEXT NOT NULL PRIMARY KEY,"
"feature_count INTEGER DEFAULT NULL"
")";
if (strstr(pszFilename, "_golden") == nullptr)
{
osSQL += ";CREATE TABLE gpkg_gdal_release_nickname(value TEXT)";
osSQL += ";INSERT INTO gpkg_gdal_release_nickname VALUES('";
osSQL += GDALVersionInfo("RELEASE_NICKNAME");
osSQL += "')";
}
}
#endif

Expand Down

0 comments on commit 9fff200

Please sign in to comment.