runSafe("DROP TABLE ft1");
runSafe("DROP TABLE ft2");
runSafe("DELETE FROM gpkg_geometry_columns where f_table_name in ('ft1','ft2')");
runSafe("DELETE FROM gpkg_contents where table_name in ('ft1','ft2')");
GeometryBuilder gb = new GeometryBuilder();
//create some data
String sql = "CREATE TABLE ft1 (id INTEGER PRIMARY KEY, geometry BLOB)";
run( sql );
sql = "ALTER TABLE ft1 add intProperty INTEGER";
run( sql );
sql = "ALTER TABLE ft1 add doubleProperty DOUBLE";
run( sql );
sql = "ALTER TABLE ft1 add stringProperty VARCHAR(255)";
run( sql );
sql = "INSERT INTO ft1 VALUES ("
+ "0,X'"+toString(gb.point(0,0))+"', 0, 0.0,'zero');";
run(sql);
sql = "INSERT INTO ft1 VALUES ("
+ "1,X'"+toString(gb.point(1,1))+"', 1, 1.1,'one');";
run(sql);
sql = "INSERT INTO ft1 VALUES ("
+ "2,X'"+toString(gb.point(2,2))+"', 2, 2.2,'two');";
run(sql);
sql = "INSERT INTO gpkg_geometry_columns VALUES ('ft1', 'geometry', 'POINT', 2, 4326)";
run(sql);