diff --git a/db/migrations/002_pinboard_archive.rb b/db/migrations/002_pinboard_archive.rb index 7b8c0fd..f0a530f 100644 --- a/db/migrations/002_pinboard_archive.rb +++ b/db/migrations/002_pinboard_archive.rb @@ -19,5 +19,8 @@ Sequel.migration do entity_id = DB[:entities].insert(created_at:, modified_at:) DB[:pinboard].insert(entity_id:, json: , created_at:, modified_at:) end + + # Remove duplicate entry + DB[:pinboard].where(id: 5001).delete end end diff --git a/db/migrations/003_create_tags.rb b/db/migrations/003_create_tags.rb index db3f7c5..9339850 100644 --- a/db/migrations/003_create_tags.rb +++ b/db/migrations/003_create_tags.rb @@ -10,6 +10,7 @@ Sequel.migration do end create_table(:entities_tags) do + primary_key :id foreign_key :entity_id, :entities, null: false foreign_key :tag_id, :tags, null: false