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

Use "if not exists" when trying to create table #14886

Merged
merged 1 commit into from Sep 11, 2019

Conversation

@tsteur
Copy link
Member

commented Sep 11, 2019

This can avoid some error logs depending on the used database adapter etc. In theory we can then remove catching the error a few lines below but should be fine to keep it as well.

If not exists should be safe to use, was even supported in old versions: http://ftp.nchu.edu.tw/MySQL/doc/refman/4.1/en/create-table.html

Not sure why it wasn't used right away. A comment in the code refers to #153 but looks like that ID wasn't 100% correctly migrated from the old trac. In any way, using if not exists should be fine...

Use "if not exists" when trying to create table
This can avoid some error logs depending on the used database adapter etc. In theory we can then remove catching the error a few lines below but should be fine to keep it as well

@tsteur tsteur added the Needs Review label Sep 11, 2019

@tsteur tsteur added this to the 3.12.0 milestone Sep 11, 2019

@diosmosis diosmosis merged commit 7b140a9 into 3.x-dev Sep 11, 2019

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/travis-ci/push The Travis CI build failed
Details

@diosmosis diosmosis deleted the createtableifnotexists branch Sep 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.