CREATE TABLE data (
    id serial,
    kind_id int NOT NULL,
	state_id int NOT NULL,
    lat float8,
    lon float8,
	country text NOT NULL,
    city text,
	name text NOT NULL,
    descr text NOT NULL,
	established text, 
	updated timestamp,
    url text,
    img text,
    manual boolean,
	visible boolean,
	source text,
	privnote text
);

CREATE TABLE kind (
    id serial,
    type    text NOT NULL,
    color   text NOT NULL
);

CREATE TABLE state (
    id serial,
    state    text NOT NULL
);
