BUG: Need to copy computation_strategies when making a copy.

But there is a unique constraint on dataset_system_id, copy_number in
dataset_copies ...

On Wed, Oct 1, 2014 at 11:39 AM, Chi <notifications@github.com> wrote:

> In
> soda-fountain-lib/src/main/scala/com/socrata/soda/server/persistence/pg/PostgresStoreImpl.scala:
>
> > @@ -633,6 +633,23 @@ class PostgresStoreImpl(dataSource: DataSource) extends NameAndSchemaStore {
> >            |           (SELECT id FROM dataset_copies WHERE dataset_system_id = ? And copy_number = ? And deleted_at is null)
> >            |      FROM columns
> >            |     WHERE copy_id = (SELECT id FROM tmp_last_copy);
> > +        INSERT INTO computation_strategies (
> > +          |    dataset_system_id,
> > +          |    column_id,
> > +          |    computation_strategy_type,
> > +          |    recompute,
> > +          |    source_columns,
> > +          |    parameters,
> > +          |    copy_id)
> > +          |    SELECT dataset_system_id,
> > +          |           column_id,
> > +          |           computation_strategy_type,
> > +          |           recompute,
> > +          |           source_columns,
> > +          |           parameters,
> > +          |           (SELECT id FROM dataset_copies WHERE dataset_system_id = ? And copy_number = ? And deleted_at is null)
>
> We are copying from the latest undeleted copy.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/socrata/soda-fountain/pull/40/files#r18298931>.
>