Install Error for new site

I installed the current version of farm os today and encountered an error during the configuration process.

FarmOS: Docker farmos:7.x-1.4
DB: PostGIS/PostGres

Error: SQLSTATE[42P07]: Duplicate table: 7 ERROR: relation “farmfield_data_field_farm_date_range_field_farm_date_range_valu” already exists

Still setting up but thought I might report.

thanks

Are you installing fresh or upgrading an existing installation?

Based on that error it sounds like the database is not empty and already has tables in it that farmOS is trying to create.

Also note: farmOS 7.x-1.x does not fully support Postgres at this time. It mostly works, but there are a few known issues that your will probably run into. Until those are solved, it’s still recommended to use MySQL/MariaDB for best results.

Thanks. This was a new installation. Thanks for the tip on postgres. I will restart using Maria DB.

Brad

I might also note, that while looking into postgis, I found that the postgis container used in the farmos docker-compose development file has not been refreshed for over a year. The postgis team actually has taken over maintenance and moved everything to a postgis/postgis repository which is actively maintained. I can submit a pull request if interested

1 Like

Ah thanks that’s great news! Yes please go ahead and make a pull request if you have the time!

I think more generally we should officially decide whether or not farmOS 7.x-1.x should support Postgres. I’ve always wanted to, but the two outstanding issues are tricky, and I’m leaning towards just fixing them in 2.0.x instead. But that means we’d have to say officially “farmOS 7.x-1.x doesn’t work with Postgres” which is sad. :frowning: - and it would probably also mean we should remove that example docker-compose.postgis.yml file. But that can be a next step - so if you want to do the PR please do!

(FWIW The plan for farmOS 2.0.x is to make Postgres the recommended database right from the start. So support will be a priority from the beginning.)

Thanks for the insights. I will work on the PR today. Just as (another) FYI, I will be running farmos on my synology NAS using a macvlan all managed via docker-compose along with several other services. I like the macvlan option as it better mimics in my mind a stand alone server from a network identity perspective (unique IP) while also providing the benefits of a container.

Brad

1 Like