Closed mdietze closed 10 years ago
This means there is a pft which does not have a modeltype associated with it, or a modeltype that does not have a model associated. You can run the following command to find them:
select * from pfts where model_type is null or model_type not in (select model_type from models);
Ok, that helped (DALEC had model_type BIOCRO in the models table but DALEC in the pfts because the models didn't allow DALEC as an option in the pull down).
Now I can't figure out why the sites table doesn't show up at all, but just gives an error message. Is there a place I can check an error log or something like that?
On Aug 15, 2014, at 8:08 AM, Rob Kooper notifications@github.com<mailto:notifications@github.com> wrote:
This means there is a pft which does not have a modeltype associated with it, or a modeltype that does not have a model associated. You can run the following command to find them:
select * from pfts where model_type is null or model_type not in (select model_type from models);
— Reply to this email directly or view it on GitHubhttps://github.com/PecanProject/bety/issues/126#issuecomment-52316359.
make sure you have changed the con/database.yml to use postgis instead of postgresql. If not it will not be able to use parse the postgis settings for the sites.
That seems to do it, thanks Rob
In updating bety on psql-pecan.bu.edu I got the following errors in the migration
PG::NotNullViolation: ERROR: column "modeltype_id" contains null values : ALTER TABLE "pfts" ALTER "modeltype_id" SET NOT NULL/usr/local/bety/db/migrate/20140729045640_add_model_type_table.rb:19:in `up'
I'm not sure how to fix this in the database since the null column is showing up during the migration itself, so I can't just go in by hand and figure out which PFT has a NULL