Initialize kart on pre existing PostGIS database #681
-
Not sure if this is the right place to ask this. Having a pre-existent database in PostgreSQL/PostGIS, already containing data is it possible to initialize a kart working copy in it and add only some of the pre-existing tables to kart versioning system? Would that make sense? I am looking for a convenient way to keep working normally in our PostGIS database, and use kart only on necessary tables. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Yes, definitely makes sense. Currently there's no way to convert a pre-existing table into a Kart table in place, but kart & non-kart tables can happily coexist in the same database — if you add the So, you can convert a table (
Related to #249 |
Beta Was this translation helpful? Give feedback.
Yes, definitely makes sense.
Currently there's no way to convert a pre-existing table into a Kart table in place, but kart & non-kart tables can happily coexist in the same database — if you add the
kart
schema into your search path (eg:ALTER DATABASE mydb SET search_path TO "$user", public, kart;
) then a query will find both kart & non-kart tables without needing the schema qualifier (first in search_path is preferred).So, you can convert a table (
mytable
) that's in thepublic
schema into a Kart table along these lines, if you don't have other related tables referring to fields inmytable
. Practise this on a database copy first!mytable
into the kart repository, so it gets chec…