PRAGMA encoding = "UTF-8";
*/
-#define OSM_TABLE_NODES "create table nodes IF NOT EXISTS ( \
+#define OSM_TABLE_NODES "create table IF NOT EXISTS nodes ( \
nid int primary key, \
ilat int not null, \
ilon int not null, \
l int not null default 0, \
f int not null default 0);"
-#define OSM_TABLE_NODE_TAGS "create table node_tags IF NOT EXISTS ( \
+#define OSM_TABLE_NODE_TAGS "create table IF NOT EXISTS node_tags ( \
nid int not null, t text);"
-#define OSM_TABLE_WAY "create table way IF NOT EXISTS ( \
+#define OSM_TABLE_WAY "create table IF NOT EXISTS way ( \
wid int primary key, \
type int not null, \
nodes int not null, \
lat real not null, \
lon real not null);"
-#define OSM_TABLE_WAY_TAGS "create table way_tags IF NOT EXISTS ( \
+#define OSM_TABLE_WAY_TAGS "create table IF NOT EXISTS way_tags ( \
wid int not null, \
t text);"
-#define OSM_TABLE_WAY_UPDATES "create table way_updates IF NOT EXISTS ( \
+#define OSM_TABLE_WAY_UPDATES "create table IF NOT EXISTS way_updates ( \
wid int primary key, \
utime int not null, \
notes text);"
-#define OSM_TABLE_WAY_N2N "create table way_n2n IF NOT EXISTS ( \
+#define OSM_TABLE_WAY_N2N "create table IF NOT EXISTS way_n2n ( \
wid int not null, \
f int not null, \
t int not null);"
-#define OSM_TABLE_WAY_NAMES "create table way_names IF NOT EXISTS ( \
+#define OSM_TABLE_WAY_NAMES "create table IF NOT EXISTS way_names ( \
wid int primary key, \
name varchar(256), \
norm varchar(256));"
-#define OSM_TABLE_WAY_PC "create table way_pc IF NOT EXISTS ( \
+#define OSM_TABLE_WAY_PC "create table IF NOT EXISTS way_pc ( \
wid int primary key, \
pc varchar(256));"
-#define OSM_TABLE_WAY_NAMES_NLS "create table way_names_nls IF NOT EXISTS ( \
+#define OSM_TABLE_WAY_NAMES_NLS "create table IF NOT EXISTS way_names_nls ( \
wid int not null, \
lang char(4) not null, \
name varchar(256), \
norm varchar(256));"
-#define OSM_TABLE_WAY_REF "create table way_ref IF NOT EXISTS ( \
+#define OSM_TABLE_WAY_REF "create table IF NOT EXISTS way_ref ( \
rid int primary key, \
ref varchar(32), \
int_ref varchar(32));"
-#define OSM_TABLE_PLACES "create table places IF NOT EXISTS ( \
+#define OSM_TABLE_PLACES "create table IF NOT EXISTS places ( \
nid int primary key, \
type int not null, \
name text, \
isin_p int not null, \
isin_c int not null);"
-#define OSM_TABLE_POI "create table poi IF NOT EXISTS ( \
+#define OSM_TABLE_POI "create table IF NOT EXISTS poi ( \
poi_id INTEGER PRIMARY KEY AUTOINCREMENT, \
lat real not null, \
lon real not null, \
priority int default 2, \
addtime int default 0);"
-#define OSM_TABLE_POI_CATEGORY "create table category IF NOT EXISTS ( \
+#define OSM_TABLE_POI_CATEGORY "create table IF NOT EXISTS category ( \
cat_id INTEGER PRIMARY KEY AUTOINCREMENT, \
pcat_id int not null default 0, \
priority int not null default 2, \