Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Copy as SQL INSERT" includes generated columns #1282

Closed
fubar opened this issue Nov 11, 2021 · 5 comments · Fixed by #1295
Closed

"Copy as SQL INSERT" includes generated columns #1282

fubar opened this issue Nov 11, 2021 · 5 comments · Fixed by #1295
Assignees
Labels
Bug Something isn't working

Comments

@fubar
Copy link

fubar commented Nov 11, 2021

  • Sequel Ace Version (including build number): 3.4.2, Build 20016
  • Sequel Ace Source (App Store/GitHub/Homebrew): App Store
  • macOS Version: 11.6
  • Processor Type (Intel/Apple): Intel
  • MySQL Version: 5.7.12
  • macOS Localization:

Description
When exporting entire tables, the "Include GENERATED columns" option works fine. However, when using the "Copy as SQL INSERT" feature on individually selected rows, it still includes generated columns.

Steps To Reproduce

  1. Create a table with a generated column
  2. Create a record
  3. Right click the record and select "Copy as SQL INSERT"
  4. Run the copied SQL

Related Issues
#1155

@gduh
Copy link
Contributor

gduh commented Nov 12, 2021

@Jason-Morcos The context menu includes these 2 elements :

  • "Copy as SQL INSERT"
  • "Copy as SQL INSERT (no aut inc)"
    Should we add a new element with "Copy as SQL INSERT (no generated columns)"
    I think this is not the right way, maybe we should keep only one element but then we should display a new window on which it will be possible to select zero, one or severals options : no but inc, no generated columns, others....
    What do you think ?

@Jason-Morcos
Copy link
Member

I like the window option but I think it gets kinda clunky for quick copies.
My vote would be to remove generated columns from both copy as SQL insert options. If you're copying something for insert, you should be able to insert it and you wouldn't be able to do so if it contained generated columns.
Thoughts?

@Jason-Morcos Jason-Morcos added the Bug Something isn't working label Nov 15, 2021
@gduh
Copy link
Contributor

gduh commented Nov 17, 2021

Agree with that. I make the change !

@gduh gduh self-assigned this Nov 17, 2021
@fubar
Copy link
Author

fubar commented Nov 17, 2021

That was my expectation as well. Thanks all!

@gduh gduh linked a pull request Nov 23, 2021 that will close this issue
11 tasks
Jason-Morcos added a commit that referenced this issue Dec 25, 2021
#changed - Remove GeneratedColumn from 'Copy as SQL Insert' #1282
@Jason-Morcos
Copy link
Member

Please try the latest beta and let us know if it's fixed now! @gduh did some great work on this one!

https://github.com/Sequel-Ace/Sequel-Ace/releases

This was referenced Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants