but [level_source_id, hint_id] is guaranteed to be unique if hint_id is not
null?
(I think mysql is cool with that being a unique index in that case)


On Tue, Jun 3, 2014 at 5:11 PM, Ellen Spertus <notifications@github.com>
wrote:

> In lib/tasks/seed.rake:
>
> > @@ -14,6 +14,20 @@ namespace :seed do
> >      end
> >    end
> >
> > +  task import_stanford_hints: :environment do
> > +    LevelSourceHint.transaction do
> > +      CSV.read('config/stanford-hint-ids.tsv', { col_sep: "\t" }).each do |row|
> > +        LevelSourceHint.create!(level_source_id: row[0], hint_id: row[1])
>
> It's expected that there will be LevelSourceHints with the same stanford
> hint_id; [level_source_id, hint_id] is not guaranteed to be unique unless
> hint_id is not null.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/code-dot-org/dashboard/pull/771/files#r13366269>.
>