-- +goose Up
ALTER TABLE farms
    ADD COLUMN farm_type TEXT,
    ADD COLUMN total_size TEXT;

ALTER TABLE farms
    ALTER COLUMN lat TYPE DOUBLE PRECISION USING lat[1],
    ALTER COLUMN lon TYPE DOUBLE PRECISION USING lon[1];

-- +goose Down
ALTER TABLE farms
    ALTER COLUMN lat TYPE DOUBLE PRECISION[] USING ARRAY[lat],
    ALTER COLUMN lon TYPE DOUBLE PRECISION[] USING ARRAY[lon];

ALTER TABLE farms
    DROP COLUMN farm_type,
    DROP COLUMN total_size;