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 EXISTS with DROP TABLE for SQLite #234

Merged
merged 2 commits into from
Dec 16, 2011
Merged

use IF EXISTS with DROP TABLE for SQLite #234

merged 2 commits into from
Dec 16, 2011

Conversation

yitznewton
Copy link
Contributor

When creating a new SQLite database, an exception is thown. Propel generates DROP TABLE statements, which fail if the table does not exist. This patch changes the command to DROP TABLE IF EXISTS, which avoids the problem.

@willdurand
Copy link
Contributor

Versionable behavior tests are broken :)

@yitznewton
Copy link
Contributor Author

D'oh. I didn't run the entire test suite b/c it segfaulted on my dev box.

@yitznewton yitznewton closed this Dec 15, 2011
@willdurand willdurand reopened this Dec 15, 2011
@willdurand
Copy link
Contributor

Why did you close the PR ? You should update it to fix all unit tests ;)

@yitznewton
Copy link
Contributor Author

OK; not experienced with PRs. Are those the only tests that are broken?

@willdurand
Copy link
Contributor

Mmh launch the complete test suite, then you'll see. If you get segfaults, you may have to increase the memory_limit value.

@yitznewton
Copy link
Contributor Author

I removed xdebug as per StackOverflow, and it worked. Running tests now..

@willdurand
Copy link
Contributor

Nice! Thanks.

willdurand added a commit that referenced this pull request Dec 16, 2011
use IF EXISTS with DROP TABLE for SQLite
@willdurand willdurand merged commit 341206e into propelorm:master Dec 16, 2011
@willdurand
Copy link
Contributor

Would you mind to port this fix on Propel2 ?

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

Successfully merging this pull request may close these issues.

None yet

2 participants