When you want to connect a Data Source in eVouala to a Postgresql table that you have created manually, you will need to respect some rules:
- must create the table in Platform database (schema is supported);
- must grant all privileges or switch ownership to eVouala super-user;
- must have a Primary Key;
- must have standard geometry projection (EPSG:4326 or EPSG:3857);
- must use supported Postgresql data type;
- must NEVER use double quote table and/or column name;
Also, for performance concerns you should add an index:
- create an index on geometry column;
- create an index on fields be used for the filter;
Here's a working example:
CREATE TABLE my_table (
id serial primary key,
type_rec integer,
date_add timestamp,
geom geometry(point,4326)
);
CREATE INDEX my_table_gix ON my_table USING GIST (geom);
CREATE INDEX my_table_type ON my_table (type_rec);
If you already have your table in your database and have no recorded Primary Key, here's how to add one:
ALTER TABLE <my_table>
ADD COLUMN id SERIAL PRIMARY KEY;
Or if you already have a unique column id :
ALTER TABLE <my_table>
ADD PRIMARY KEY (id);
Grant privileges to platform super-user (evouala)
ALTER TABLE <my_table> OWNER TO evouala;GRANT ALL PRIVILEGES ON <my_table> TO evouala;
Attach this Form to your Data source to test editing in a map:
0 Comments