Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Use "if not exists" when trying to create table #14886
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...