From 330f99a53b0369fc7f9590292ef6f4f5a1ea62e9 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Mon, 4 Feb 2008 15:46:36 +0200 Subject: [PATCH] Argh. Fix the create tables. --- src/osm-sql-tables.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/osm-sql-tables.h b/src/osm-sql-tables.h index 1a69e3d..38ec9e7 100644 --- a/src/osm-sql-tables.h +++ b/src/osm-sql-tables.h @@ -12,7 +12,7 @@ PRAGMA page_size=4096; 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, \ @@ -21,10 +21,10 @@ PRAGMA encoding = "UTF-8"; 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, \ @@ -35,48 +35,48 @@ PRAGMA encoding = "UTF-8"; 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, \ @@ -94,7 +94,7 @@ PRAGMA encoding = "UTF-8"; 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, \ -- 2.39.5