posterior_id and ensemble_id where ints instead of bigint.

mistake, had all foreign ID's as ints, not bigints.
This is not a many to many, but a 1 to many relation ship of one posterior to many samples, hence the singular notation. And yes it is PosteriorSamples.