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

Changing case in table name #1200

Closed
10 tasks
zentaz opened this issue Oct 27, 2017 · 6 comments
Closed
10 tasks

Changing case in table name #1200

zentaz opened this issue Oct 27, 2017 · 6 comments

Comments

@zentaz
Copy link

zentaz commented Oct 27, 2017

Details for the issue

Hi,

When trying to change case in table name I get an error message saying that table already exists.
I assume this is a bug?

dbb_rename_bug

Thanks!
Richard

Useful extra information

I'm opening this issue because:

  • DB4S is crashing
  • [ x ] DB4S has a bug
  • DB4S needs a feature
  • DB4S has another problem

I'm using DB4S on:

  • [ x ] Windows: ( version:10_ )
  • Linux: ( distro: ___ )
  • Mac OS: ( version: ___ )
  • Other: ___

I'm using DB4S version:

  • [ x ] 3.10.1
  • 3.10.0
  • 3.9.1
  • Other: ___

I have also:

@chrisjlocke
Copy link
Member

chrisjlocke commented Oct 27, 2017

Not 'strictly' a bug, but a quirk! ;) Table names in SQLite are case insensitive, so if you want to change the case, change the name also (eg, DazData to dazdataa, then dazdataa back to dazdata)

Guess DB4S could do similar - when changing a name, change it to something random, then back again to what the user wanted.

I thought DOS would have the same issue, but Win 10 handles it correctly.

image

@justinclift
Copy link
Member

Hmmm, wonder how well foreign keys referencing the table-being-renamed would go with that approach. Might need to do something with pragma's to disable foreign key checking until the renaming is completed.

@zentaz
Copy link
Author

zentaz commented Oct 28, 2017

OK, will try that workaround. Thanks! :)

MKleusberg added a commit that referenced this issue Oct 31, 2017
SQLite doesn't support this by itself, so we have to work around it.

See issue #1200.
@MKleusberg
Copy link
Member

I've just added this workaround to our code 😄 So with tomorrow's nightly build onwards, you don't have to this yourself anymore and changing the case in table names will "just work". Are you ok to give that a try and see if it's working for you, @zentaz?

@zentaz
Copy link
Author

zentaz commented Nov 1, 2017

Just tried the latest build, changing case works fine now. Thanks very much! :)

@MKleusberg
Copy link
Member

Cool, thanks for confirming 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants