jakob / jakob/Postico

Feature Request: Copy Insert statement without primary key

Open
#292 3 comments 3 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
486
Forks
8
PR merge metrics
No merged PRs in 30d

Description

This would be a nice option to have, as when you're copying data from production > staging, staging > local development etc, using the copy insert statement functionality, the fact that it includes the primary key can mess with the sequencing, as it does not update the sequence of the tables and causes other inserts to fail because it tries to an id that's next in the sequence but is already in use on the table.
It can also be troublesome when you're trying to copy test data around and you're trying to insert rows with the ids that are already in use too, which means I have to write a tool to remove the ids from the insert statement.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue does not name files or tests. Start by locating the copy insert statement functionality, then determine how it currently includes primary keys; done means providing an option to omit those columns while preserving the other copied values and producing valid INSERT statements.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sql
Domain
database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.